commit | 2f50f0422f38c2251be5e90898a8396a044391a4 | [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:09:25 2012 +0300 |
tree | b7746d0cbc217cc1d2819da74c2530d3247168b5 | |
parent | 39c76a3cc73236ecead1a6d9b80fa9f966ee9615 [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>