[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20170811.135725.67224099020250004.davem@davemloft.net>
Date: Fri, 11 Aug 2017 13:57:25 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: vivien.didelot@...oirfairelinux.com
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
kernel@...oirfairelinux.com, f.fainelli@...il.com, andrew@...n.ch
Subject: Re: [PATCH net] net: dsa: ksz: fix skb freeing
From: Vivien Didelot <vivien.didelot@...oirfairelinux.com>
Date: Wed, 9 Aug 2017 16:46:09 -0400
> The DSA layer frees the original skb when an xmit function returns NULL,
> meaning an error occurred. But if the tagging code copied the original
> skb, it is responsible of freeing the copy if an error occurs.
>
> The ksz tagging code currently has two issues: if skb_put_padto fails,
> the skb copy is not freed, and the original skb will be freed twice.
>
> To fix that, move skb_put_padto inside both branches of the skb_tailroom
> condition, before freeing the original skb, and free the copy on error.
>
> Signed-off-by: Vivien Didelot <vivien.didelot@...oirfairelinux.com>
Applied, thanks.
Powered by blists - more mailing lists