macvtap: fix recovery from gup errors
authorMichael S. Tsirkin <mst@redhat.com>
Sun, 23 Jun 2013 14:26:58 +0000 (17:26 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 25 Jun 2013 23:17:10 +0000 (16:17 -0700)
commit4c7ab054ab4f5d63625508ed6f8a607184cae7c2
tree63273346588712553b8bece014b124cd2b6196e4
parent7e24bfbe43b545b1689a5f134ed83645b9e34b86
macvtap: fix recovery from gup errors

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>
drivers/net/macvtap.c