fanotify: might_sleep() warning in fanotify_read()

From: Jiri Kosina
Date: Tue Dec 30 2014 - 08:26:18 EST


current Linus' tree is giving me

WARNING: CPU: 0 PID: 310 at kernel/sched/core.c:7303 __might_sleep+0x8d/0xa0()
do not call blocking ops when !TASK_RUNNING; state=1 set at [<ffffffff810904da>] prepare_to_wait+0x2a/0x90

which is because fanotify_read() is doing this:

prepare_to_wait(&group->notification_waitq, &wait, TASK_INTERRUPTIBLE);

i.e. calls mutex_lock() while it's already TASK_INTERRUPTIBLE.

Jiri Kosina
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at