|From:||Arjan van de Ven <arjan-AT-infradead.org>|
|To:||Olof Johansson <olof-AT-austin.ibm.com>|
|Subject:||Re: [PATCH/RFC] Futex mmap_sem deadlock|
|Date:||Wed, 23 Feb 2005 18:37:01 +0100|
|Cc:||Linus Torvalds <torvalds-AT-osdl.org>, Joe Korty <joe.korty-AT-ccur.com>, Jamie Lokier <jamie-AT-shareable.org>, Andrew Morton <akpm-AT-osdl.org>, linux-kernel-AT-vger.kernel.org, rusty-AT-rustcorp.com.au|
On Wed, 2005-02-23 at 11:10 -0600, Olof Johansson wrote: > On Wed, Feb 23, 2005 at 07:54:06AM -0800, Linus Torvalds wrote: > > > > Otherwise, a preempt attempt in get_user would not be seen > > > until some future preempt_enable was executed. > > > > True. I guess we should have a "preempt_check_resched()" there too. That's > > what "kunmap_atomic()" does too (which is what we rely on in the other > > case we do this..) > > Ok, this is getting complex enough to warrant get_user_inatomic(), > which means adding it to every arch's uaccess.h. > > Below patch does so. Unfortunately I don't have a Viro setup with cross > compilers for nearly every arch, so I can't make sure it doesn't break > anything. But since I pasted the same code everywhere it shouldn't. I hate to do this to you, but get_user is a bit horrible in that it is an untyped interface. Fixing it is hard (ugh) but when adding new variants should/could we consider to please make it a typed (eg inline and not a define) interface please ?
Copyright © 2005, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds