Re: [PATCH RFC] sysfs: fix the race of "parent deleted before child added"

From: Tejun Heo
Date: Fri Aug 01 2014 - 08:50:52 EST


Hello,

On Fri, Aug 01, 2014 at 07:18:12PM +0800, Jianyu Zhan wrote:
> A proper fix for this is to pin the parent kernfs_node on the
> dir_entry creation point (sysfs_create_dir_ns), and to de-pin the parent
> on the dir_entry deletion point(sysfs_remove_dir).

The *only* reason we have the warning at all is because the driver
model wants to enforce that destruction is performed in the proper
order and what you're doing is just circumventing the detection logic.
We might as well just remove it. Please track down why the specific
warning that you saw happened. We wanna learn about them and fix
them.

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/