]> git.baikalelectronics.ru Git - kernel.git/commit
net: fix memory leak on oom with zerocopy
authorMichael S. Tsirkin <mst@redhat.com>
Sat, 15 Sep 2012 22:44:16 +0000 (22:44 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 18 Sep 2012 20:24:00 +0000 (16:24 -0400)
commite7a57d687ee117a13c1168c5d9c38b0451c4a929
tree143c603ac88a8d4bd8717329f9676ba28dcd6427
parentb89d6da1b4e4f6a495958e307e964c105d7a670d
net: fix memory leak on oom with zerocopy

If orphan flags fails, we don't free the skb
on receive, which leaks the skb memory.

Return value was also wrong: netif_receive_skb
is supposed to return NET_RX_DROP, not ENOMEM.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev.c