Re: [PATCH 2/5] RDMA/core: Fix netdev use-after-free in ib_get_eth_speed()

From: Leon Romanovsky

Date: Tue Sep 22 2026 - 10:35:58 EST


On Wed, Sep 16, 2026 at 06:33:06PM +0000, Wentao Liang wrote:
> The device reference is dropped before netdev->name is read in the
> warning emitted when __ethtool_get_link_ksettings() fails. If that was
> the last reference the name is read from a freed netdev.
>
> Move dev_put() below the last use of netdev.
>
> Fixes: d41861942fc5 ("IB/core: Add generic function to extract IB speed from netdev")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Wentao Liang <vulab@xxxxxxxxxxx>
> ---
> drivers/infiniband/core/verbs.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)

We already accepted this patch
https://patchwork.kernel.org/project/linux-rdma/patch/20260812081708.32468-1-krystianmkaniewski@xxxxxxxxx/

Thanks