From: Michael S. Tsirkin Date: Tue, 14 Oct 2014 23:52:31 +0000 (+1030) Subject: virtio_net: fix use after free on allocation failure X-Git-Tag: fixes-against-v3.18-rc2~57^2~10 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=024655555021e971203c519770609509e0af4468;p=pandora-kernel.git virtio_net: fix use after free on allocation failure In the extremely unlikely event that driver initialization fails after RX buffers are added, virtio net frees RX buffers while VQs are still active, potentially causing device to use a freed buffer. To fix, reset device first - same as we do on device removal. Signed-off-by: Michael S. Tsirkin Reviewed-by: Cornelia Huck Signed-off-by: Rusty Russell --- Reading git-diff-tree failed