linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net 1/1] net: usb: qmi_wwan: fix memory leak for not ip packets
@ 2024-08-01 13:55 Daniele Palmas
  2024-08-01 14:33 ` Bjørn Mork
  2024-08-05 23:34 ` Jakub Kicinski
  0 siblings, 2 replies; 3+ messages in thread
From: Daniele Palmas @ 2024-08-01 13:55 UTC (permalink / raw)
  To: Bjørn Mork, David S . Miller, Jakub Kicinski, Paolo Abeni,
	Eric Dumazet
  Cc: netdev, linux-usb, Daniele Palmas

Free the unused skb when not ip packets arrive.

Fixes: c6adf77953bc ("net: usb: qmi_wwan: add qmap mux protocol support")
Signed-off-by: Daniele Palmas <dnlplm@gmail.com>
---
 drivers/net/usb/qmi_wwan.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
index 386d62769ded..cfda32047cff 100644
--- a/drivers/net/usb/qmi_wwan.c
+++ b/drivers/net/usb/qmi_wwan.c
@@ -201,6 +201,7 @@ static int qmimux_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
 			break;
 		default:
 			/* not ip - do not know what to do */
+			kfree_skb(skbn);
 			goto skip;
 		}
 
-- 
2.37.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net 1/1] net: usb: qmi_wwan: fix memory leak for not ip packets
  2024-08-01 13:55 [PATCH net 1/1] net: usb: qmi_wwan: fix memory leak for not ip packets Daniele Palmas
@ 2024-08-01 14:33 ` Bjørn Mork
  2024-08-05 23:34 ` Jakub Kicinski
  1 sibling, 0 replies; 3+ messages in thread
From: Bjørn Mork @ 2024-08-01 14:33 UTC (permalink / raw)
  To: Daniele Palmas
  Cc: David S . Miller, Jakub Kicinski, Paolo Abeni, Eric Dumazet,
	netdev, linux-usb

Daniele Palmas <dnlplm@gmail.com> writes:

> Free the unused skb when not ip packets arrive.
>
> Fixes: c6adf77953bc ("net: usb: qmi_wwan: add qmap mux protocol support")
> Signed-off-by: Daniele Palmas <dnlplm@gmail.com>
> ---
>  drivers/net/usb/qmi_wwan.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
> index 386d62769ded..cfda32047cff 100644
> --- a/drivers/net/usb/qmi_wwan.c
> +++ b/drivers/net/usb/qmi_wwan.c
> @@ -201,6 +201,7 @@ static int qmimux_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
>  			break;
>  		default:
>  			/* not ip - do not know what to do */
> +			kfree_skb(skbn);
>  			goto skip;
>  		}


Makes sense.

Acked-by: Bjørn Mork <bjorn@mork.no>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net 1/1] net: usb: qmi_wwan: fix memory leak for not ip packets
  2024-08-01 13:55 [PATCH net 1/1] net: usb: qmi_wwan: fix memory leak for not ip packets Daniele Palmas
  2024-08-01 14:33 ` Bjørn Mork
@ 2024-08-05 23:34 ` Jakub Kicinski
  1 sibling, 0 replies; 3+ messages in thread
From: Jakub Kicinski @ 2024-08-05 23:34 UTC (permalink / raw)
  To: Daniele Palmas
  Cc: Bjørn Mork, David S . Miller, Paolo Abeni, Eric Dumazet,
	netdev, linux-usb

On Thu,  1 Aug 2024 15:55:12 +0200 Daniele Palmas wrote:
> Free the unused skb when not ip packets arrive.
> 
> Fixes: c6adf77953bc ("net: usb: qmi_wwan: add qmap mux protocol support")
> Signed-off-by: Daniele Palmas <dnlplm@gmail.com>

Applied, thanks!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-08-05 23:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-01 13:55 [PATCH net 1/1] net: usb: qmi_wwan: fix memory leak for not ip packets Daniele Palmas
2024-08-01 14:33 ` Bjørn Mork
2024-08-05 23:34 ` Jakub Kicinski

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).