Messages in this thread | | | Subject | Re: [patch] x86: some lock annotations for user copy paths | From | Andi Kleen <> | Date | Wed, 10 Sep 2008 16:31:15 +0200 |
| |
Nick Piggin <npiggin@suse.de> writes: > int __copy_from_user(void *dst, const void __user *src, unsigned size) > { > int ret = 0; > + > + might_sleep(); > + if (current->mm) > + might_lock_read(¤t->mm->mmap_sem);
It would be nicer if you defined a standard function for this, e.g. a might_page_fault();
This would also make it easier to potentially add more locks.
-Andi
-- ak@linux.intel.com
| |