]> git.karo-electronics.de Git - karo-tx-linux.git/commit
macvtap: zerocopy: put page when fail to get all requested user pages
authorJason Wang <jasowang@redhat.com>
Wed, 2 May 2012 03:41:58 +0000 (11:41 +0800)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 25 Jul 2012 03:11:03 +0000 (04:11 +0100)
commite9214638ead441c15b48f40c3b459aede77c2662
treef5ae23ac8f76798aae5dfb48e1b7b7261267b8a8
parent14180f501e674f1bbe352d37c962ede4d8f679d4
macvtap: zerocopy: put page when fail to get all requested user pages

commit 02ce04bb3d28c3333231f43bca677228dbc686fe upstream.

When get_user_pages_fast() fails to get all requested pages, we could not use
kfree_skb() to free it as it has not been put in the skb fragments. So we need
to call put_page() instead.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/net/macvtap.c