Re: [PATCH] race condition fixing in sysfs_create_dir

From: Tejun Heo
Date: Fri Jul 26 2013 - 09:41:59 EST

On Fri, Jul 26, 2013 at 09:38:56AM -0400, Tejun Heo wrote:
> I don't think sysfs is supposed to handle multiple actors trying to
> populate and destroy the directory at the same time at all, so this

e.g. kobj->sd assignment in sysfs_create_dir() isn't synchronized and
doesn't have memory barrier either. Nothing prevents subdirectory
creation from accessing half-initialized sysfs_dirent on architectures
which require read dependency barriers. The caller is responsible for
synchronizing these operations.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at