From: JeffleXu <jefflexu@linux.alibaba.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: sashal@kernel.org, stable@vger.kernel.org,
joseph.qi@linux.alibaba.com, caspar@linux.alibaba.com,
Hannes Reinecke <hare@suse.de>
Subject: Re: [PATCH 1/3] virtio-blk: close udev startup race condition as default groups
Date: Wed, 17 Feb 2021 21:12:38 +0800 [thread overview]
Message-ID: <6046ceef-061c-d93f-b6a1-2ce2483bec3c@linux.alibaba.com> (raw)
In-Reply-To: <f466aacc-f9ca-49ca-0da8-16dc045c9000@linux.alibaba.com>
Hi all,
Would you please evaluate if these should be fixed in stable tree, at
least for the virtio-blk scenario [1] ?
[1] commit e982c4d0a29b1d61fbe7716a8dcf8984936d6730 ("virtio-blk:
modernize sysfs attribute creation")
On 2/8/21 9:40 AM, JeffleXu wrote:
>
>
> On 2/7/21 7:56 PM, Greg KH wrote:
>> On Sun, Feb 07, 2021 at 07:46:54PM +0800, Jeffle Xu wrote:
>>> commit fef912bf860e8e7e48a2bfb978a356bba743a8b7 upstream.
>>> commit e982c4d0a29b1d61fbe7716a8dcf8984936d6730 upstream.
>>>
>>> Similar to commit 9e07f4e24379 ("zram: close udev startup race condition
>>> as default groups"), this is a merge of [1, 2], since [1] may be too
>>> large size to be merged into -stable tree.
>>
>> Why is it too big?
>>
>>> This issue has been introduced since v2.6.36 by [3].
>>>
>>> [1] fef912bf860e, block: genhd: add 'groups' argument to device_add_disk
>>> [2] e982c4d0a29b, virtio-blk: modernize sysfs attribute creation
>>> [3] a5eb9e4ff18a, virtio_blk: Add 'serial' attribute to virtio-blk devices (v2)
>>
>> What userspace tools are now hitting this issue? If it's a real
>> problem, let's take the real commits, right?
>>
>> Same for the other patches in this series.
>>
>
> udevd hits this issue. systemd-udevd is responsible for creating
> symlinks, such as '/dev/disk/by-id/XXXX' when receiving KOBJ_ADD uevent
> from kernel space. For virtio-blk devices, udevd will read
> '/sys/devices/pciXXXX/block/serial' to acquire the corresponding serial
> id of the virtio-blk device.
>
> Without this fixing patch, '/sys/devices/pciXXXX/block/serial' is
> created after the KOBJ_ADD uevent. Thus when udevd received KOBJ_ADD
> uevent, it may find that '/sys/devices/pciXXXX/block/serial' doesn't
> exist at that time, and finally failed to create '/dev/disk/by-id/XXXX'
> symlink.
>
> I found several similar posts on internet, complaining
> '/dev/disk/by-id/XXXX' is not created for virtio-blk devices. This issue
> indeed is caused by some sort of race condition. I also found that
> systemd-239 doesn't have this issue, while systemd-219 has. But we
> didn't find the exact fixing commit for this issue for systemd-239 though.
>
--
Thanks,
Jeffle
next prev parent reply other threads:[~2021-02-17 13:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-07 11:46 [PATCH 0/3] close udev startup race condition for several devices Jeffle Xu
2021-02-07 11:46 ` [PATCH 1/3] virtio-blk: close udev startup race condition as default groups Jeffle Xu
2021-02-07 11:56 ` Greg KH
2021-02-07 22:46 ` Sasha Levin
2021-02-08 1:40 ` JeffleXu
2021-02-17 13:12 ` JeffleXu [this message]
2021-02-17 13:26 ` Greg KH
2021-02-18 2:23 ` JeffleXu
2021-02-07 11:46 ` [PATCH 2/3] aoe: " Jeffle Xu
2021-02-07 11:46 ` [PATCH 3/3] nvme: " Jeffle Xu
2021-02-07 11:52 ` [PATCH 0/3] close udev startup race condition for several devices JeffleXu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6046ceef-061c-d93f-b6a1-2ce2483bec3c@linux.alibaba.com \
--to=jefflexu@linux.alibaba.com \
--cc=caspar@linux.alibaba.com \
--cc=gregkh@linuxfoundation.org \
--cc=hare@suse.de \
--cc=joseph.qi@linux.alibaba.com \
--cc=sashal@kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox