Re: [PATCH net] netdevsim: check the driver is bound in new_port/del_port
From: patchwork-bot+netdevbpf
Date: Mon Nov 09 2026 - 22:04:49 EST
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@xxxxxxxxxx>:
On Sun, 1 Nov 2026 20:58:24 +0700 you wrote:
> new_port and del_port are attributes of the bus device, so they stay
> reachable after the driver is unbound. nsim_drv_remove() clears
> drvdata, yet both handlers pass it straight to priv_to_devlink() and
> devl_lock(), which faults on a small negative pointer:
>
> BUG: unable to handle page fault for address: fffffffffffffeb0
> RIP: 0010:__lock_acquire+0x41/0x2de0 kernel/locking/lockdep.c:5140
> Call Trace:
> lock_acquire+0x115/0x350
> mutex_lock_nested+0x55/0x1d0
> nsim_drv_port_add+0x5a/0x140 drivers/net/netdevsim/dev.c:1760
> new_port_store+0x1a5/0x280 drivers/net/netdevsim/bus.c:96
> kernfs_fop_write_iter+0x3a5/0x540
>
> [...]
Here is the summary with links:
- [net] netdevsim: check the driver is bound in new_port/del_port
https://git.kernel.org/netdev/net-next/c/98aaf4da98d2
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html