Commit e8cd8169 authored by Al Viro's avatar Al Viro
Browse files

vt: synchronize_rcu() under spinlock is not nice...

vcs_poll_data_free() calls unregister_vt_notifier(), which calls
atomic_notifier_chain_unregister(), which calls synchronize_rcu().
Do it *after* we'd dropped ->f_lock.

Cc: (all kernels since 2.6.37)
Signed-off-by: default avatarAl Viro <>
parent 7ea600b5
......@@ -93,7 +93,7 @@ vcs_poll_data_free(struct vcs_poll_data *poll)
static struct vcs_poll_data *
vcs_poll_data_get(struct file *file)
struct vcs_poll_data *poll = file->private_data;
struct vcs_poll_data *poll = file->private_data, *kill = NULL;
if (poll)
return poll;
......@@ -122,10 +122,12 @@ vcs_poll_data_get(struct file *file)
file->private_data = poll;
} else {
/* someone else raced ahead of us */
kill = poll;
poll = file->private_data;
if (kill)
return poll;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment