Re: [PATCH v2] block: don't show io_timeout if driver has no timeout handler

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

 



On Wed, 2019-04-03 at 18:48 +-0800, Weiping Zhang wrote:
+AD4 Could you point out the race case for udev?

Hi Weiping,

A quote from Documentation/kobject.txt:

+ACI-Use the KOBJ+AF8-ADD action for when the kobject is first added to the kernel.
This should be done only after any attributes or children of the kobject
have been initialized properly, as userspace will instantly start to look
for them when this call happens.+ACI

You may want to have a look at commit 33b14f67a4e1 (+ACI-nvme: register ns+AF8-id
attributes as default sysfs groups+ACI) as an example of a patch that fixes a
race condition between sysfs attribute creation and udev.

Regarding the block layer timeout attribute: I just noticed that for the
request queue kobj attribute KOBJ+AF8-ADD is triggered explicitly from
blk+AF8-register+AF8-queue():

	kobject+AF8-uevent(+ACY-q-+AD4-kobj, KOBJ+AF8-ADD)+ADs

Your patch adds sysfs attributes before that code is encountered so it should
be fine.

Bart.



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux