RE: [PATCH iwl-net 3/3] ice: do not block on the aux device lock in ndo_setup_tc
From: Loktionov, Aleksandr
Date: Wed Oct 21 2026 - 07:23:15 EST
> -----Original Message-----
> From: Petr Oros <poros@xxxxxxxxxx>
> Sent: Monday, October 19, 2026 8:53 AM
> To: netdev@xxxxxxxxxxxxxxx
> Cc: Oros, Petr <poros@xxxxxxxxxx>; Nguyen, Anthony L
> <anthony.l.nguyen@xxxxxxxxx>; Kitszel, Przemyslaw
> <przemyslaw.kitszel@xxxxxxxxx>; Andrew Lunn <andrew+netdev@xxxxxxx>;
> David S . Miller <davem@xxxxxxxxxxxxx>; Eric Dumazet
> <edumazet@xxxxxxxxxx>; Jakub Kicinski <kuba@xxxxxxxxxx>; Paolo Abeni
> <pabeni@xxxxxxxxxx>; Ertman, David M <david.m.ertman@xxxxxxxxx>; Shiraz
> Saleem <shiraz.saleem@xxxxxxxxx>; Leon Romanovsky <leon@xxxxxxxxxx>;
> Maziarz, Kamil <kamil.maziarz@xxxxxxxxx>; Rafal Rogalski
> <rafalx.rogalski@xxxxxxxxx>; Loktionov, Aleksandr
> <aleksandr.loktionov@xxxxxxxxx>; Schmidt, Michal <mschmidt@xxxxxxxxxx>;
> linux-rdma@xxxxxxxxxxxxxxx; intel-wired-lan@xxxxxxxxxxxxxxxx; linux-
> kernel@xxxxxxxxxxxxxxx; stable@xxxxxxxxxxxxxxx; Sebastian Andrzej
> Siewior <bigeasy@xxxxxxxxxxxxx>; Clark Williams <clrkwllms@xxxxxxxxxx>;
> Steven Rostedt <rostedt@xxxxxxxxxxx>; Mateusz Palczewski
> <mateusz.palczewski@xxxxxxxxx>; linux-rt-devel@xxxxxxxxxxxxxxx
> 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@xxxxxxxxxxxxxxx
> Signed-off-by: Petr Oros <poros@xxxxxxxxxx>
> ---
> 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.c
> b/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, enum
> tc_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 ?
> + }
> locked = true;
> if (cdev->adev->dev.driver) {
> netdev_err(netdev, "Cannot change qdisc when
> RDMA is active\n");
> --
> 2.56.0