mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
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: stable@vger.kernel.org (all kernels since 2.6.37) Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
7ea600b531
commit
e8cd81693b
1 changed files with 4 additions and 2 deletions
|
@ -93,7 +93,7 @@ vcs_poll_data_free(struct vcs_poll_data *poll)
|
||||||
static struct vcs_poll_data *
|
static struct vcs_poll_data *
|
||||||
vcs_poll_data_get(struct file *file)
|
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)
|
if (poll)
|
||||||
return poll;
|
return poll;
|
||||||
|
@ -122,10 +122,12 @@ vcs_poll_data_get(struct file *file)
|
||||||
file->private_data = poll;
|
file->private_data = poll;
|
||||||
} else {
|
} else {
|
||||||
/* someone else raced ahead of us */
|
/* someone else raced ahead of us */
|
||||||
vcs_poll_data_free(poll);
|
kill = poll;
|
||||||
poll = file->private_data;
|
poll = file->private_data;
|
||||||
}
|
}
|
||||||
spin_unlock(&file->f_lock);
|
spin_unlock(&file->f_lock);
|
||||||
|
if (kill)
|
||||||
|
vcs_poll_data_free(kill);
|
||||||
|
|
||||||
return poll;
|
return poll;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue