* [PATCH net-next] macvtap: correctly free skb during socket destruction
@ 2016-07-19 3:02 Jason Wang
2016-07-19 5:11 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Jason Wang @ 2016-07-19 3:02 UTC (permalink / raw)
To: davem, netdev, linux-kernel; +Cc: dan.carpenter, Jason Wang
We should use kfree_skb() instead of kfree() to free an skb.
Fixes: 362899b8725b ("macvtap: switch to use skb array")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
drivers/net/macvtap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c
index 9204d19..a38c0da 100644
--- a/drivers/net/macvtap.c
+++ b/drivers/net/macvtap.c
@@ -536,7 +536,7 @@ static void macvtap_sock_destruct(struct sock *sk)
struct sk_buff *skb;
while ((skb = skb_array_consume(&q->skb_array)) != NULL)
- kfree(skb);
+ kfree_skb(skb);
}
static int macvtap_open(struct inode *inode, struct file *file)
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] macvtap: correctly free skb during socket destruction
2016-07-19 3:02 [PATCH net-next] macvtap: correctly free skb during socket destruction Jason Wang
@ 2016-07-19 5:11 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-07-19 5:11 UTC (permalink / raw)
To: jasowang; +Cc: netdev, linux-kernel, dan.carpenter
From: Jason Wang <jasowang@redhat.com>
Date: Tue, 19 Jul 2016 11:02:59 +0800
> We should use kfree_skb() instead of kfree() to free an skb.
>
> Fixes: 362899b8725b ("macvtap: switch to use skb array")
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Jason Wang <jasowang@redhat.com>
Applied, thanks Jason.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-07-19 5:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-19 3:02 [PATCH net-next] macvtap: correctly free skb during socket destruction Jason Wang
2016-07-19 5:11 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).