diff options
author | Andreas Kling <kling@serenityos.org> | 2022-08-23 17:58:05 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-08-24 14:57:51 +0200 |
commit | cf16b2c8e64709d570c5f54a981017d217e95ed0 (patch) | |
tree | 16c9efdaaa579ae51682a51a58949ce02c3d2092 /Kernel/FileSystem/OpenFileDescription.cpp | |
parent | d6ef18f587d4a7e4f58487c84e0b9eb260f3ec5a (diff) | |
download | serenity-cf16b2c8e64709d570c5f54a981017d217e95ed0.zip |
Kernel: Wrap process address spaces in SpinlockProtected
This forces anyone who wants to look into and/or manipulate an address
space to lock it. And this replaces the previous, more flimsy, manual
spinlock use.
Note that pointers *into* the address space are not safe to use after
you unlock the space. We've got many issues like this, and we'll have
to track those down as wlel.
Diffstat (limited to 'Kernel/FileSystem/OpenFileDescription.cpp')
-rw-r--r-- | Kernel/FileSystem/OpenFileDescription.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/FileSystem/OpenFileDescription.cpp b/Kernel/FileSystem/OpenFileDescription.cpp index 4331a5ec8c..153a1baeb3 100644 --- a/Kernel/FileSystem/OpenFileDescription.cpp +++ b/Kernel/FileSystem/OpenFileDescription.cpp @@ -374,9 +374,9 @@ InodeMetadata OpenFileDescription::metadata() const return {}; } -ErrorOr<Memory::Region*> OpenFileDescription::mmap(Process& process, Memory::VirtualRange const& range, u64 offset, int prot, bool shared) +ErrorOr<Memory::Region*> OpenFileDescription::mmap(Process& process, Memory::AddressSpace& address_space, Memory::VirtualRange const& range, u64 offset, int prot, bool shared) { - return m_file->mmap(process, *this, range, offset, prot, shared); + return m_file->mmap(process, address_space, *this, range, offset, prot, shared); } ErrorOr<void> OpenFileDescription::truncate(u64 length) |