summaryrefslogtreecommitdiffstats
path: root/drivers/virtio
diff options
context:
space:
mode:
authorStefano Garzarella <sgarzare@redhat.com>2021-03-11 14:52:57 +0100
committerMichael S. Tsirkin <mst@redhat.com>2021-03-14 18:10:07 -0400
commit0bde59c1723a29e294765c96dbe5c7fb639c2f96 (patch)
tree9d9138624f98034333fc7ab409786b993f0602d3 /drivers/virtio
parentf6bbf0010ba004f5e90c7aefdebc0ee4bd3283b9 (diff)
downloadlinux-stable-0bde59c1723a29e294765c96dbe5c7fb639c2f96.tar.gz
linux-stable-0bde59c1723a29e294765c96dbe5c7fb639c2f96.tar.bz2
linux-stable-0bde59c1723a29e294765c96dbe5c7fb639c2f96.zip
vhost-vdpa: set v->config_ctx to NULL if eventfd_ctx_fdget() fails
In vhost_vdpa_set_config_call() if eventfd_ctx_fdget() fails the 'v->config_ctx' contains an error instead of a valid pointer. Since we consider 'v->config_ctx' valid if it is not NULL, we should set it to NULL in this case to avoid to use an invalid pointer in other functions such as vhost_vdpa_config_put(). Fixes: 776f395004d8 ("vhost_vdpa: Support config interrupt in vdpa") Cc: lingshan.zhu@intel.com Cc: stable@vger.kernel.org Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> Link: https://lore.kernel.org/r/20210311135257.109460-3-sgarzare@redhat.com Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'drivers/virtio')
0 files changed, 0 insertions, 0 deletions