mbox series

[v2,0/2] Fix a race condition related to creation of /dev/nvme0n<x>

Message ID 20180813172531.7451-1-bart.vanassche@wdc.com (mailing list archive)
Headers show
Series Fix a race condition related to creation of /dev/nvme0n<x> | expand

Message

Bart Van Assche Aug. 13, 2018, 5:25 p.m. UTC
Hello Jens,

The two patches in this series fix a race condition related to the creation of
the sysfs attributes for the /dev/nvme0n<x> devices nodes. I encountered this
race while adding tests to the blktests project for the NVMeOF kernel
drivers. Please consider these patches for the upstream kernel.

Thanks,

Bart.

Bart Van Assche (2):
  block: Introduce alloc_disk_node_attr()
  nvme: Fix race conditions related to creation of /dev/nvme0n<x>

 block/genhd.c                | 26 ++++++++++++++++++++++++--
 drivers/nvme/host/core.c     | 17 +++++------------
 drivers/nvme/host/lightnvm.c | 34 +++++++---------------------------
 drivers/nvme/host/nvme.h     |  9 ++++-----
 include/linux/genhd.h        | 13 +++++++++++--
 5 files changed, 51 insertions(+), 48 deletions(-)

Comments

Hannes Reinecke Aug. 13, 2018, 6:42 p.m. UTC | #1
On 08/13/2018 07:25 PM, Bart Van Assche wrote:
> Hello Jens,
> 
> The two patches in this series fix a race condition related to the creation of
> the sysfs attributes for the /dev/nvme0n<x> devices nodes. I encountered this
> race while adding tests to the blktests project for the NVMeOF kernel
> drivers. Please consider these patches for the upstream kernel.
> 
> Thanks,
> 
> Bart.
> 
> Bart Van Assche (2):
>    block: Introduce alloc_disk_node_attr()
>    nvme: Fix race conditions related to creation of /dev/nvme0n<x>
> 
>   block/genhd.c                | 26 ++++++++++++++++++++++++--
>   drivers/nvme/host/core.c     | 17 +++++------------
>   drivers/nvme/host/lightnvm.c | 34 +++++++---------------------------
>   drivers/nvme/host/nvme.h     |  9 ++++-----
>   include/linux/genhd.h        | 13 +++++++++++--
>   5 files changed, 51 insertions(+), 48 deletions(-)
> 
I have fixed the very same thing with my patchset titled "genhd: 
register default groups with device_add_disk" which is waiting for 
inclusion.

Cheers,

Hannes
Bart Van Assche Aug. 13, 2018, 6:44 p.m. UTC | #2
On Mon, 2018-08-13 at 20:42 +0200, Hannes Reinecke wrote:
> I have fixed the very same thing with my patchset titled "genhd: 
> register default groups with device_add_disk" which is waiting for 
> inclusion.

Thanks Hannes for the feedback. I will drop this patch series and review
your patches instead.

Bart.