]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: ethernet: ec_bhf: Fix dma_free_coherent() dma handle
authorThomas Fourier <fourier.thomas@gmail.com>
Fri, 13 Feb 2026 16:43:39 +0000 (17:43 +0100)
committerJakub Kicinski <kuba@kernel.org>
Wed, 18 Feb 2026 01:16:55 +0000 (17:16 -0800)
commitffe68c3766997d82e9ccaf1cdbd47eba269c4aa2
tree88d1badce8b5547644793633bc7e1c1db6ed363e
parente3f000f0dee1bfab52e2e61ca6a3835d9e187e35
net: ethernet: ec_bhf: Fix dma_free_coherent() dma handle

dma_free_coherent() in error path takes priv->rx_buf.alloc_len as
the dma handle. This would lead to improper unmapping of the buffer.

Change the dma handle to priv->rx_buf.alloc_phys.

Fixes: 6af55ff52b02 ("Driver for Beckhoff CX5020 EtherCAT master module.")
Cc: <stable@vger.kernel.org>
Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com>
Link: https://patch.msgid.link/20260213164340.77272-2-fourier.thomas@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/ec_bhf.c