[ros-dev] Some proposed mm edits to sort out address space locking

Filip Navara xnavara at volny.cz
Wed Jun 21 12:56:35 CEST 2006

----- PŮVODNÍ ZPRÁVA -----
Od: "art yerkes" <ayerkes at speakeasy.net>
Komu: ros-dev at 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.


Best regards,

More information about the Ros-dev mailing list