]> git.baikalelectronics.ru Git - kernel.git/commit
vhost: fix ubuf_info cleanup
authorMichael S. Tsirkin <mst@redhat.com>
Thu, 6 Jun 2013 12:20:46 +0000 (15:20 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 11 Jun 2013 09:46:21 +0000 (02:46 -0700)
commitf6129a62edf2577b3721c07e3f095a39b02e44b9
treef84bd0f51046e6372ca390ba3302ae60c3a6bc28
parent924ea40daa83f0b2537301dbd8304f1eeb53c599
vhost: fix ubuf_info cleanup

vhost_net_clear_ubuf_info didn't clear ubuf_info
after kfree, this could trigger double free.
Fix this and simplify this code to make it more robust: make sure
ubuf info is always freed through vhost_net_clear_ubuf_info.

Reported-by: Tommi Rantala <tt.rantala@gmail.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/vhost/net.c