]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usbnet: ipheth: race between ipheth_close and error handling
authorOliver Neukum <oneukum@suse.com>
Tue, 6 Aug 2024 17:28:05 +0000 (19:28 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Sep 2024 09:07:50 +0000 (11:07 +0200)
commit0914c26262f4f6b38b06cef9b9f6462847818630
tree1c0921461165ed014e035580e1d3fa8d205509b3
parent9719687398dea8a6a12a10321a54dd75eec7ab2d
usbnet: ipheth: race between ipheth_close and error handling

[ Upstream commit e5876b088ba03a62124266fa20d00e65533c7269 ]

ipheth_sndbulk_callback() can submit carrier_work
as a part of its error handling. That means that
the driver must make sure that the work is cancelled
after it has made sure that no more URB can terminate
with an error condition.

Hence the order of actions in ipheth_close() needs
to be inverted.

Signed-off-by: Oliver Neukum <oneukum@suse.com>
Signed-off-by: Foster Snowhill <forst@pen.gy>
Tested-by: Georgi Valkov <gvalkov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/usb/ipheth.c