summaryrefslogtreecommitdiffstats
path: root/drivers/macintosh/windfarm_pm112.c
diff options
context:
space:
mode:
authorMichael S. Tsirkin2014-02-13 10:45:11 +0100
committerDavid S. Miller2014-02-14 00:47:30 +0100
commitb0c057ca7e835b36c6050c7627634b664796c1d6 (patch)
tree328353448d8946ef639ed9c0d5be239e38058859 /drivers/macintosh/windfarm_pm112.c
parentvhost: fix ref cnt checking deadlock (diff)
downloadkernel-qcow2-linux-b0c057ca7e835b36c6050c7627634b664796c1d6.tar.gz
kernel-qcow2-linux-b0c057ca7e835b36c6050c7627634b664796c1d6.tar.xz
kernel-qcow2-linux-b0c057ca7e835b36c6050c7627634b664796c1d6.zip
vhost: fix a theoretical race in device cleanup
vhost_zerocopy_callback accesses VQ right after it drops a ubuf reference. In theory, this could race with device removal which waits on the ubuf kref, and crash on use after free. Do all accesses within rcu read side critical section, and synchronize on release. Since callbacks are always invoked from bh, synchronize_rcu_bh seems enough and will help release complete a bit faster. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Jason Wang <jasowang@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/macintosh/windfarm_pm112.c')
0 files changed, 0 insertions, 0 deletions