]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
cxgb4: Properly lock TX queue for the selftest.
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Mon, 29 Apr 2024 09:11:47 +0000 (11:11 +0200)
committerJakub Kicinski <kuba@kernel.org>
Wed, 1 May 2024 01:30:56 +0000 (18:30 -0700)
commit9067eccdd7849dd120d5495dbd5a686fa6ed2c1a
tree7340571e21aa7692187367eb918d9feb0f3d576a
parent9f8eeea1643c213c0e1ad2e546a15536200d216b
cxgb4: Properly lock TX queue for the selftest.

The selftest for the driver sends a dummy packet and checks if the
packet will be received properly as it should be. The regular TX path
and the selftest can use the same network queue so locking is required
and was missing in the selftest path. This was addressed in the commit
cited below.
Unfortunately locking the TX queue requires BH to be disabled which is
not the case in selftest path which is invoked in process context.
Lockdep should be complaining about this.

Use __netif_tx_lock_bh() for TX queue locking.

Fixes: c650e04898072 ("cxgb4: Fix race between loopback and normal Tx path")
Reported-by: "John B. Wyatt IV" <jwyatt@redhat.com>
Closes: https://lore.kernel.org/all/Zic0ot5aGgR-V4Ks@thinkpad2021/
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Link: https://lore.kernel.org/r/20240429091147.YWAaal4v@linutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/chelsio/cxgb4/sge.c