[PATCH net v2 2/2] net: ll_temac: Reset buffer on dma_map_single() errors

Katakam, Harini harini.katakam at amd.com
Mon Feb 6 01:59:39 PST 2023


Hi Jonas,

> -----Original Message-----
> From: Jonas Suhr Christensen <jsc at umbraculum.org>
> Sent: Monday, February 6, 2023 1:41 AM
> To: netdev at vger.kernel.org
> Cc: jsc at umbraculum.org; David S. Miller <davem at davemloft.net>; Eric
> Dumazet <edumazet at google.com>; Jakub Kicinski <kuba at kernel.org>;
> Paolo Abeni <pabeni at redhat.com>; Michal Simek
> <michal.simek at xilinx.com>; Katakam, Harini <harini.katakam at amd.com>;
> Haoyue Xu <xuhaoyue1 at hisilicon.com>; huangjunxian
> <huangjunxian6 at hisilicon.com>; Christophe JAILLET
> <christophe.jaillet at wanadoo.fr>; Yang Yingliang
> <yangyingliang at huawei.com>; Esben Haabendal <esben at geanix.com>;
> linux-arm-kernel at lists.infradead.org; linux-kernel at vger.kernel.org
> Subject: [PATCH net v2 2/2] net: ll_temac: Reset buffer on dma_map_single()
> errors
> 
> To avoid later calls to dma_unmap_single() on address'
> that fails to be mapped, free the allocated skb and
> set the pointer of the address to NULL. Eg. when a mapping
> fails temac_dma_bd_release() will try to call dma_unmap_single()
> on that address if the structure is not reset.
> 
> Fixes: d07c849cd2b9 ("net: ll_temac: Add more error handling of
> dma_map_single() calls")
> 
> Signed-off-by: Jonas Suhr Christensen <jsc at umbraculum.org>

Thanks for the patch
Reviewed-by: Harini Katakam <harini.katakam at amd.com>

Regards,
Harini



More information about the linux-arm-kernel mailing list