* [bug report] macvtap: switch to use skb array
@ 2016-07-18 18:26 Dan Carpenter
2016-07-19 6:33 ` Jason Wang
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2016-07-18 18:26 UTC (permalink / raw)
To: kernel-janitors
Hello Jason Wang,
The patch 362899b8725b: "macvtap: switch to use skb array" from Jul
15, 2016, leads to the following static checker warning:
drivers/net/macvtap.c:539 macvtap_sock_destruct()
error: use kfree_skb() here instead of kfree(skb)
drivers/net/macvtap.c
533 static void macvtap_sock_destruct(struct sock *sk)
534 {
535 struct macvtap_queue *q = container_of(sk, struct macvtap_queue, sk);
536 struct sk_buff *skb;
537
538 while ((skb = skb_array_consume(&q->skb_array)) != NULL)
539 kfree(skb);
Should be kfree_skb(). On my way to airport or would send patch.
540 }
regards,
dan carpenter
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [bug report] macvtap: switch to use skb array
2016-07-18 18:26 [bug report] macvtap: switch to use skb array Dan Carpenter
@ 2016-07-19 6:33 ` Jason Wang
0 siblings, 0 replies; 2+ messages in thread
From: Jason Wang @ 2016-07-19 6:33 UTC (permalink / raw)
To: kernel-janitors
On 2016年07月19日 02:26, Dan Carpenter wrote:
> Hello Jason Wang,
>
> The patch 362899b8725b: "macvtap: switch to use skb array" from Jul
> 15, 2016, leads to the following static checker warning:
>
> drivers/net/macvtap.c:539 macvtap_sock_destruct()
> error: use kfree_skb() here instead of kfree(skb)
>
> drivers/net/macvtap.c
> 533 static void macvtap_sock_destruct(struct sock *sk)
> 534 {
> 535 struct macvtap_queue *q = container_of(sk, struct macvtap_queue, sk);
> 536 struct sk_buff *skb;
> 537
> 538 while ((skb = skb_array_consume(&q->skb_array)) != NULL)
> 539 kfree(skb);
>
> Should be kfree_skb(). On my way to airport or would send patch.
Patch sent, thanks a lot!
>
> 540 }
>
> regards,
> dan carpenter
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-07-19 6:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-18 18:26 [bug report] macvtap: switch to use skb array Dan Carpenter
2016-07-19 6:33 ` Jason Wang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.