Re: [PATCH net] net: ibm: emac: mal: fix NAPI locking

From: Simon Horman

Date: Thu Aug 13 2026 - 05:47:23 EST


On Tue, Aug 11, 2026 at 03:08:13PM +0800, Runyu Xiao wrote:
> Since commit 413f0271f396 ("net: protect NAPI enablement with
> netdev_lock()"), napi_enable() and napi_disable() take netdev_lock().
>
> mal_register_commac() and mal_unregister_commac() call these helpers
> while holding mal->lock with interrupts disabled. In the unregister
> path, napi_disable() may also wait for polling to finish, while the poll
> completion path takes mal->lock.
>
> Take netdev_lock() before mal->lock, use the locked NAPI helpers, and
> drop mal->lock before napi_disable_locked().
>
> Fixes: 413f0271f396 ("net: protect NAPI enablement with netdev_lock()")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Runyu Xiao <runyu.xiao@xxxxxxxxxx>

Reviewed-by: Simon Horman <horms@xxxxxxxxxx>