commit | c460f0573941cb28dc7f35595679c3508f0ce41f | [log] [tgz] |
---|---|---|
author | Jason Wang <jasowang@redhat.com> | Wed May 02 11:42:23 2012 +0800 |
committer | Michael S. Tsirkin <mst@redhat.com> | Wed May 02 18:22:22 2012 +0300 |
tree | 9d25dc66fdc5030ce551c6d2393ee1c23932f4b3 | |
parent | b92946e2919134ebe2a4083e4302236295ea2a73 [diff] |
vhost_net: zerocopy: fix possible NULL pointer dereference of vq->bufs When we want to disable vhost_net backend while there's a tx work, a possible NULL pointer defernece may happen we we try to deference the vq->bufs after vhost_net_set_backend() assign a NULL to it. As suggested by Michael, fix this by checking the vq->bufs instead of vhost_sock_zcopy(). Signed-off-by: Michael S. Tsirkin <mst@redhat.com>