Re: [PATCH iwl-net 3/3] ice: do not block on the aux device lock in ndo_setup_tc
flat view
From: Petr Oros <hidden>
Date: 2026-10-22 10:54:48
Also in:
intel-wired-lan, linux-rdma, linux-rt-devel, lkml, stable
On 10/21/26 1:22 PM, Loktionov, Aleksandr wrote:
quoted
-----Original Message----- From: Petr Oros <redacted> Sent: Monday, October 19, 2026 8:53 AM To: netdev@vger.kernel.org Cc: Oros, Petr <redacted>; Nguyen, Anthony L [off-list ref]; Kitszel, Przemyslaw [off-list ref]; Andrew Lunn [off-list ref]; David S . Miller [off-list ref]; Eric Dumazet [off-list ref]; Jakub Kicinski [off-list ref]; Paolo Abeni [off-list ref]; Ertman, David M [off-list ref]; Shiraz Saleem [off-list ref]; Leon Romanovsky [off-list ref]; Maziarz, Kamil [off-list ref]; Rafal Rogalski [off-list ref]; Loktionov, Aleksandr [off-list ref]; Schmidt, Michal [off-list ref]; linux-rdma@vger.kernel.org; intel-wired-lan@lists.osuosl.org; linux- kernel@vger.kernel.org; stable@vger.kernel.org; Sebastian Andrzej Siewior [off-list ref]; Clark Williams [off-list ref]; Steven Rostedt [off-list ref]; Mateusz Palczewski [off-list ref]; linux-rt-devel@lists.linux.dev Subject: [PATCH iwl-net 3/3] ice: do not block on the aux device lock in ndo_setup_tc The TC_SETUP_QDISC_MQPRIO path of ice_setup_tc() takes the auxiliary device lock to test whether the RDMA driver is bound, and ndo_setup_tc() runs with the RTNL lock held. This closes the same cycle against the RDMA auxiliary probe as the two preceding patches. Use device_trylock() and report the device as busy when it fails, with a distinct message for the same reason as in the previous patch. Fixes: 4b31fd4d77ff ("ice: Fix RDMA VSI removal during queue rebuild") Cc: stable@vger.kernel.org Signed-off-by: Petr Oros <redacted> --- drivers/net/ethernet/intel/ice/ice_main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)diff --git a/drivers/net/ethernet/intel/ice/ice_main.cb/drivers/net/ethernet/intel/ice/ice_main.c index edb62606d2aae3..7b251136149615 100644--- a/drivers/net/ethernet/intel/ice/ice_main.c +++ b/drivers/net/ethernet/intel/ice/ice_main.c@@ -9448,7 +9448,11 @@ ice_setup_tc(struct net_device *netdev, enumtc_setup_type type, cdev = pf->cdev_info; if (cdev && cdev->adev) { mutex_lock(&pf->adev_mutex); - device_lock(&cdev->adev->dev); + if (!device_trylock(&cdev->adev->dev)) { + mutex_unlock(&pf->adev_mutex); + netdev_dbg(netdev, "RDMA auxiliary device is busy, try again\n"); + return -EBUSY;You return error here, but it looks like being silently dropped in mqprio_disable_offload() isn't it ?
Yes, mqprio_disable_offload() ignores it, the same as it ignores the existing -EBUSY for a bound RDMA driver. Blocking there brings the deadlock back and skipping the lock races with the probe, so v2 keeps the refusal and warns about it instead of netdev_dbg().
quoted
+ } locked = true; if (cdev->adev->dev.driver) { netdev_err(netdev, "Cannot change qdisc when RDMA is active\n"); -- 2.56.0