Re: [RFC PATCH v3] Use kernfs_break_active_protection() for device online store callbacks

From: Tejun Heo
Date: Wed Apr 16 2014 - 11:18:02 EST


Hello,

On Wed, Apr 16, 2014 at 09:41:40AM +0800, Li Zhong wrote:
> > If so, that is
> > an actually possible deadlock, no?
>
> Yes, but it seems to me that it is solved in commit 5e33bc41, which uses
> lock_device_hotplug_sysfs() to return a restart syscall error if not
> able to try lock the device_hotplug_lock. That also requires the device
> removing code path to take the device_hotplug_lock.

But that patch only takes out device_hotplug_lock out of the
dependency graph and does nothing for cpu_add_remove_lock. It seems
to be that there still is a deadlock condition involving s_active and
cpu_add_remove_lock. Am I missing something here?

Now that kernfs has a proper mechanism to deal with it, wouldn't it
make more sense to replace 5e33bc41 with prper s_active protection
breaking?

Thanks.

--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/