Message ID | ZCjPdIkEQ0ALhdUU@7e9e31583646 (mailing list archive) |
---|---|
State | Mainlined, archived |
Headers | show |
Series | [zyytlz.wz@163.com:,[V9fs-developer,net,v3] 9p/xen : Fix use after free bug in xen_9pfs_front_remove due to race condition] | expand |
diff --git a/net/9p/trans_xen.c b/net/9p/trans_xen.c index c64050e839ac..df467ffb52d0 100644 --- a/net/9p/trans_xen.c +++ b/net/9p/trans_xen.c @@ -280,6 +280,10 @@ static void xen_9pfs_front_free(struct xen_9pfs_front_priv *priv) write_unlock(&xen_9pfs_lock); for (i = 0; i < priv->num_rings; i++) { + struct xen_9pfs_dataring *ring = &priv->rings[i]; + + cancel_work_sync(&ring->work); + if (!priv->rings[i].intf) break; if (priv->rings[i].irq > 0)