Re: Hanging problems in 2.0.30 -- discoveries

David S. Miller (
Sat, 2 Aug 1997 20:37:12 -0400

Date: Sat, 02 Aug 1997 14:09:42 -0400
From: Bill Hawes <>

I've attached a preliminary patch that may help -- it cleanly
initializes the semaphore, and then acquires the current mmap_sem
before calling dup_mmap(). This isn't the best way to do things,
but if it help we're probably on the right track.

Another thing I noticed that looks possibly dangerous -- if the
memory map includes a mmapped file, the new mm gets added to the
inode's shared list. The mm is not yet fully constructed, but is
it possible that the new task could be prematurely awakened via the
inode shared list? Maybe somebody else here has looked into that

For reasons I've told you and Linus in another mail, vmscan.c page
freeing code needs to grab this semaphore as well.

David "Sparc" Miller