On 7/10/24 12:09 AM, Leon Romanovsky wrote: >> diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c >> index 55aa7aa32d4a..7ddaec923569 100644 >> --- a/drivers/infiniband/core/device.c >> +++ b/drivers/infiniband/core/device.c >> @@ -2167,7 +2167,7 @@ int ib_device_set_netdev(struct ib_device *ib_dev, struct net_device *ndev, >> } >> >> if (old_ndev) >> - netdev_tracker_free(ndev, &pdata->netdev_tracker); >> + netdev_put(old_ndev, &pdata->netdev_tracker); > > It should stay netdev_tracker_free() and not netdev_put(). We are > calling to __dev_put(old_ndev) later in the function. > missed that and KASAN and refcount debugging did not complain ... Anyways, why have the 2 split apart? ie., why not remove the __dev_put and just do netdev_put here? old_ndev is not needed in between calls. Asymmetric calls like this are always confusing.