Re: [PATCH rdma-next v1] RDMA/device: Don't fire uevent before device is fully initialized

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, May 05, 2019 at 07:33:20PM +0300, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@xxxxxxxxxxxx>
> 
> 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: d79af7242bb2 ("RDMA/device: Expose ib_device_try_get(()")
> Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxxxx>
> ---
> Changelog
>  v0 -> v1
>  * Fix comment as suggested by Parav.
> ---
>  drivers/infiniband/core/device.c | 9 +++++++++
>  1 file changed, 9 insertions(+)

While I don't particularly like this approach, it seems like all we
will be able to manage for this merge window, so applied to for-next

Thanks,
Jason



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux