lkml.org 
[lkml]   [2008]   [Sep]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [patch] x86: some lock annotations for user copy paths
From
Date
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(&current->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


\
 
 \ /
  Last update: 2008-09-10 16:33    [W:0.086 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site