Re: Deadlock on the mm->mmap_sem

Linus Torvalds
2001-09-18T16:50:57Z

On Tue, 18 Sep 2001, David Howells wrote:
>
> Okay preliminary as-yet-untested patch to cure coredumping of the need
> to hold the mm semaphore:
>
> - kernel/fork.c: function to partially copy an mm_struct and attach it
> to the task_struct in place of the old.

Oh, please no.

If the choice is between a hack to do strange and incomprehensible things
for a special case, and just making the semaphores do the same thing
rw-spinlocks do and make the problem go away naturally, Ill take #2 any
day. The patches already exist, after all.

Linus