macvtap: fix recovery from gup errors
authorMichael S. Tsirkin <mst@redhat.com>
Sun, 23 Jun 2013 14:26:58 +0000 (17:26 +0300)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 2 Aug 2013 20:14:45 +0000 (22:14 +0200)
[ Upstream commit 4c7ab054ab4f5d63625508ed6f8a607184cae7c2 ]

get user pages might fail partially in macvtap zero copy
mode. To recover we need to put all pages that we got,
but code used a wrong index resulting in double-free
errors.

Reported-by: Brad Hubbard <bhubbard@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>

No differences found