From: "Michael S. Tsirkin" <m...@redhat.com>
Date: Thu, 13 Feb 2014 11:45:11 +0200

> 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 <m...@redhat.com>
> ---
> 
> This is was previously posted as part of patch
> series, but it's an independent fix really.
> Theoretical race so not needed for stable I think.

Ok, no -stable, applied.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to