[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87od2wrs24.fsf@basil.nowhere.org>
Date: Wed, 10 Sep 2008 16:31:15 +0200
From: Andi Kleen <andi@...stfloor.org>
To: Nick Piggin <npiggin@...e.de>
Cc: Ingo Molnar <mingo@...e.hu>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [patch] x86: some lock annotations for user copy paths
Nick Piggin <npiggin@...e.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@...ux.intel.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists