Skip to content
Commit e7a5b4aa authored by Leon Romanovsky's avatar Leon Romanovsky Committed by Jason Gunthorpe
Browse files

RDMA/device: Don't fire uevent before device is fully initialized



When the refcount is 0 the device is invisible to netlink. However in the
patch below the refcount = 1 was moved to after the device_add().  This
creates a race where userspace can issue a netlink query after the
device_add() event and not see the device as visible.

Ensure that no uevent is fired before device is fully registered.

Fixes: d79af724 ("RDMA/device: Expose ib_device_try_get(()")
Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent d2c4ada1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment