Re: [PATCH, RESEND] Avoid that SCSI device removal through sysfs triggers a deadlock

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

 



On Mon, 2018-07-30 at 07:13 -0700, tj+AEA-kernel.org wrote:
+AD4- Also, wouldn't it be better to just expose sysfs+AF8-break/unbreak and
+AD4- then do sth like the following from scsi?
+AD4- 
+AD4-         kobject+AF8-get()+ADs-
+AD4- 	sysfs+AF8-break+AF8-active+AF8-protection()+ADs-
+AD4- 	do normal sysfs removal+ADs-
+AD4- 	sysfs+AF8-unbreak..()+ADs-
+AD4- 	kobject+AF8-put()+ADs-

Hello Tejun,

It's not clear to me how the sysfs+AF8-break+AF8-active+AF8-protection() should obtain
the struct kernfs+AF8-node pointer to the attribute. Calling that function before
device+AF8-remove+AF8-file+AF8-self() causes a double call to kernfs+AF8-break+AF8-active+AF8-protection(),
which is wrong. Calling kernfs+AF8-find+AF8-and+AF8-get(kobj-+AD4-sd, attr-+AD4-name) after the
attribute has been removed results in a NULL pointer because the attribute that
that call tries to look up has already been removed. Should I proceed with the
approach proposed in the patches attached to a previous e-mail?

Thanks,

Bart.





[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux