[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAB_54W4GidkZiHTJzfE8ZX8_MatUPW92O7tyjuyJ=OxmHOFwbQ@mail.gmail.com>
Date: Sun, 23 Jan 2022 16:00:17 -0500
From: Alexander Aring <alex.aring@...il.com>
To: Miquel Raynal <miquel.raynal@...tlin.com>
Cc: Stefan Schmidt <stefan@...enfreihafen.org>,
linux-wpan - ML <linux-wpan@...r.kernel.org>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
"open list:NETWORKING [GENERAL]" <netdev@...r.kernel.org>,
Xue Liu <liuxuenetmail@...il.com>,
Marcel Holtmann <marcel@...tmann.org>,
Harry Morris <harrymorris12@...il.com>,
David Girault <david.girault@...vo.com>,
Romuald Despres <romuald.despres@...vo.com>,
Frederic Blain <frederic.blain@...vo.com>,
Nicolas Schodet <nico@...fr.eu.org>,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>
Subject: Re: [wpan-next v2 5/9] net: ieee802154: ca8210: Stop leaking skb's
Hi,
On Thu, 20 Jan 2022 at 06:21, Miquel Raynal <miquel.raynal@...tlin.com> wrote:
>
> Upon error the ieee802154_xmit_complete() helper is not called. Only
> ieee802154_wake_queue() is called manually. We then leak the skb
> structure.
>
> Free the skb structure upon error before returning.
>
> Fixes: ded845a781a5 ("ieee802154: Add CA8210 IEEE 802.15.4 device driver")
> Signed-off-by: Miquel Raynal <miquel.raynal@...tlin.com>
> ---
> drivers/net/ieee802154/ca8210.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/ieee802154/ca8210.c b/drivers/net/ieee802154/ca8210.c
> index ece6ff6049f6..8e69441f1fff 100644
> --- a/drivers/net/ieee802154/ca8210.c
> +++ b/drivers/net/ieee802154/ca8210.c
> @@ -1772,6 +1772,7 @@ static int ca8210_async_xmit_complete(
> );
> if (status != MAC_TRANSACTION_OVERFLOW) {
> ieee802154_wake_queue(priv->hw);
> + dev_kfree_skb_any(priv->tx_skb);
> return 0;
first free() then wake().
- Alex
Powered by blists - more mailing lists