----- PŮVODNÍ ZPRÁVA -----
Od: "art yerkes" <ayerkes(a)speakeasy.net>
Komu: ros-dev(a)reactos.org
Předmět: [ros-dev] Some proposed mm edits to sort out address space
Datum: 21.6.2006 - 2:46:48
Since our MmNotPresentFault handler and kin need to
lock the
associated MADDRESS_SPACE, we often need to lock an
address space
when it's already been locked. Until now, this has
caused a
recursive acquisition of a kernel mutex.
I have never seen this happen in practice. That's also why we had the
FromMdl parameter here to avoid it in the cases where it was supposed
to happen.
The current kernel bugchecks for me when running the
wget binary
here:
http://www.superheterodyne.net/reactos/mm_edit/wget.exe
So I've added a boolean to MADDRESS_SPACE to specify
that it's been
locked and propogated its use (and also disentangled
this flag from
the one specifying that pages are locked in various
cases).
The patch is here:
http://www.superheterodyne.net/reactos/mm_edit/mm.diff
The patch looks wrong. Not only it effectively kills the locks (because
you don't check for thread affinity, so it's like not locking at all
... not to mention that it wasn't thread-safe either) ...
... but also i disagree with recursive locking (even if it was implemented
correcty) since you should never cause a page fault or anything when
you're holding the lock.
[snip]
Best regards,
Filip