mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 14:41:02 +07:00
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 <mst@redhat.com>
This commit is contained in:
parent
a27e13d370
commit
11cd1a8b8c
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user