From: Michael S. Tsirkin Date: Sun, 14 Nov 2010 15:31:52 +0000 (+0200) Subject: vhost/net: fix rcu check usage X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=11cd1a8b8cad1acfc140d9acce93762a9c140b20;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git vhost/net: fix rcu check usage Incorrect rcu check was used as rcu isn't done under mutex here. Force check to 1 for now, to stop it from complaining. Signed-off-by: Michael S. Tsirkin --- diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 4b4da5b86ff..f442668a1e5 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -129,8 +129,9 @@ static void handle_tx(struct vhost_net *net) size_t hdr_size; struct socket *sock; - sock = rcu_dereference_check(vq->private_data, - lockdep_is_held(&vq->mutex)); + /* TODO: check that we are running from vhost_worker? + * Not sure it's worth it, it's straight-forward enough. */ + sock = rcu_dereference_check(vq->private_data, 1); if (!sock) return;