Messages in this thread | | | Date | Sat, 2 Aug 2003 11:39:07 -0700 | From | Andrew Morton <> | Subject | Re: [PATCH] [1/2] random: SMP locking |
| |
Zwane Mwaikambo <zwane@arm.linux.org.uk> wrote: > > Perhaps might_sleep() in *_user, copy_* etc is in order?
Probably, with a little care.
A userspace copy while in an atomic region is actually legal, on behalf of the read() and write() pagecache copy functions: if we take a fault while holding an atomic kmap, the fault handler bales and the usercopy returns a short copy.
In other words: if you stick a might_sleep() in __copy_from_user() and __copy_to_user() you get a false positive on every read() and write().
We could probably add it to copy_to_user() and copy_from_user() though. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |