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

esben at geanix.com esben at geanix.com
Mon Feb 6 23:59:25 PST 2023


Jonas Suhr Christensen <jsc at umbraculum.org> writes:

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

Acked-by: Esben Haabendal <esben at geanix.com>



More information about the linux-arm-kernel mailing list