]> www.infradead.org Git - users/willy/pagecache.git/commit
eth: via-rhine: fix calling napi_enable() in atomic context
authorJakub Kicinski <kuba@kernel.org>
Fri, 24 Jan 2025 03:18:40 +0000 (19:18 -0800)
committerJakub Kicinski <kuba@kernel.org>
Mon, 27 Jan 2025 22:30:49 +0000 (14:30 -0800)
commit09a939487fc8b2a437a8f1df20fe95e2857523d9
treea6f47dc40c4dde43d60139f5248a859cbca2cab3
parentf1d12bc7a596fce1df6a02cab1fdb797cc4d1642
eth: via-rhine: fix calling napi_enable() in atomic context

napi_enable() may sleep now, take netdev_lock() before rp->lock.
napi_enable() is hidden inside init_registers().

Note that this patch orders netdev_lock after rp->task_lock,
to avoid having to take the netdev_lock() around disable path.

Fixes: 413f0271f396 ("net: protect NAPI enablement with netdev_lock()")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/dcfd56bc-de32-4b11-9e19-d8bd1543745d@stanley.mountain
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20250124031841.1179756-7-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/via/via-rhine.c