On 05/14/2015 10:31 AM, Andrea Arcangeli wrote:
+static int userfaultfd_wake_function(wait_queue_t *wq, unsigned mode,
+ int wake_flags, void *key)
+{
+ struct userfaultfd_wake_range *range = key;
+ int ret;
+ struct userfaultfd_wait_queue *uwq;
Hi Dave,
On Tue, Jun 23, 2015 at 12:00:19PM -0700, Dave Hansen wrote:
Down in userfaultfd_wake_function(), it looks like you intended for a
len=0 to mean wake all. But the validate_range() that we do from
userspace has a !len check in it, which keeps us from passing a len=0 in
from
On Thu, May 14, 2015 at 10:49:06AM -0700, Linus Torvalds wrote:
On Thu, May 14, 2015 at 10:31 AM, Andrea Arcangeli aarca...@redhat.com
wrote:
+static __always_inline void wake_userfault(struct userfaultfd_ctx *ctx,
+ struct userfaultfd_wake_range
On Fri, May 15, 2015 at 9:04 AM, Andrea Arcangeli aarca...@redhat.com wrote:
To fix it I added this along a comment:
Ok, this looks good as a explanation/fix for the races (and also as an
example of my worry about waitqueue_active() use in general).
However, it now makes me suspect that the
On Thu, May 14, 2015 at 10:31 AM, Andrea Arcangeli aarca...@redhat.com wrote:
+static __always_inline void wake_userfault(struct userfaultfd_ctx *ctx,
+ struct userfaultfd_wake_range
*range)
+{
+ if (waitqueue_active(ctx-fault_wqh))
+