From: Eric W. Biederman Date: Mon, 20 Aug 2007 12:36:30 +0000 (+0900) Subject: sysfs: Introduce sysfs_rename_mutex X-Git-Tag: v2.6.24-rc1~1394^2~29 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=932ea2e374dd1ca26676297a5eccd1cdab86f7cd;p=pandora-kernel.git sysfs: Introduce sysfs_rename_mutex Looking carefully at the rename code we have a subtle dependency that the structure of sysfs not change while we are performing a rename. If the parent directory of the object we are renaming changes while the rename is being performed nasty things could happen when we go to release our locks. So introduce a sysfs_rename_mutex to prevent this highly unlikely theoretical issue. In addition hold sysfs_rename_mutex over all calls to sysfs_get_dentry. Allowing sysfs_get_dentry to be simplified in the future. Signed-off-by: Eric W. Biederman Signed-off-by: Tejun Heo Cc: Cornelia Huck Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed