diff options
| author | Greg Kroah-Hartman <gregkh@suse.de> | 2010-07-21 13:35:32 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-07-21 13:35:32 -0700 |
| commit | ba93752a69c1012b6cc295812a619440648d1275 (patch) | |
| tree | 2f2b4fe19ed644a427af68db939dcd4fb0ea8c0d | |
| parent | 1c0bf62749683622d2f566e6e17669eb9dfe5c97 (diff) | |
| download | patches-ba93752a69c1012b6cc295812a619440648d1275.tar.gz | |
sysfs bugfixes
3 files changed, 72 insertions, 0 deletions
diff --git a/driver-core.current/sysfs-allow-creating-symlinks-from-untagged-to-tagged-directories.patch b/driver-core.current/sysfs-allow-creating-symlinks-from-untagged-to-tagged-directories.patch new file mode 100644 index 00000000000000..83136dd1cb8b59 --- /dev/null +++ b/driver-core.current/sysfs-allow-creating-symlinks-from-untagged-to-tagged-directories.patch @@ -0,0 +1,36 @@ +From ebiederm@xmission.com Wed Jul 21 13:33:47 2010 +To: Greg KH <gregkh@suse.de> +Cc: Andrew Morton <akpm@linux-foundation.org>, Greg KH <greg@kroah.com>, + "Rafael J. Wysocki" <rjw@sisk.pl>, + "Maciej W. Rozycki" <macro@linux-mips.org>, + Kay Sievers <kay.sievers@vrfy.org>, + Johannes Berg <johannes@sipsolutions.net> +Subject: sysfs: allow creating symlinks from untagged to tagged directories +From: ebiederm@xmission.com (Eric W. Biederman) +Date: Tue, 20 Jul 2010 22:12:01 -0700 +Message-ID: <m1r5ix4dwe.fsf_-_@fess.ebiederm.org> + + +Supporting symlinks from untagged to tagged directories is reasonable, +and needed to support CONFIG_SYSFS_DEPRECATED. So don't fail a prior +allowing that case to work. + +Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + fs/sysfs/symlink.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/fs/sysfs/symlink.c ++++ b/fs/sysfs/symlink.c +@@ -67,7 +67,8 @@ static int sysfs_do_create_link(struct k + + sysfs_addrm_start(&acxt, parent_sd); + /* Symlinks must be between directories with the same ns_type */ +- if (ns_type == sysfs_ns_type(sd->s_symlink.target_sd->s_parent)) { ++ if (!ns_type || ++ (ns_type == sysfs_ns_type(sd->s_symlink.target_sd->s_parent))) { + if (warn) + error = sysfs_add_one(&acxt, sd); + else diff --git a/driver-core.current/sysfs-sysfs_delete_link-handle-symlinks-from-untagged-to-tagged-directories.patch b/driver-core.current/sysfs-sysfs_delete_link-handle-symlinks-from-untagged-to-tagged-directories.patch new file mode 100644 index 00000000000000..cb435c7889ddbd --- /dev/null +++ b/driver-core.current/sysfs-sysfs_delete_link-handle-symlinks-from-untagged-to-tagged-directories.patch @@ -0,0 +1,33 @@ +From ebiederm@xmission.com Wed Jul 21 13:33:29 2010 +To: Greg KH <gregkh@suse.de> +Cc: Andrew Morton <akpm@linux-foundation.org>, Greg KH <greg@kroah.com>, + "Rafael J. Wysocki" <rjw@sisk.pl>, + "Maciej W. Rozycki" <macro@linux-mips.org>, + Kay Sievers <kay.sievers@vrfy.org>, + Johannes Berg <johannes@sipsolutions.net> +Subject: sysfs: sysfs_delete_link handle symlinks from untagged to tagged directories. +From: ebiederm@xmission.com (Eric W. Biederman) +Date: Tue, 20 Jul 2010 22:10:58 -0700 +Message-ID: <m1vd894dy5.fsf_-_@fess.ebiederm.org> + + +This happens for network devices when SYSFS_DEPRECATED is enabled. + +Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + fs/sysfs/symlink.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/fs/sysfs/symlink.c ++++ b/fs/sysfs/symlink.c +@@ -135,7 +135,7 @@ void sysfs_delete_link(struct kobject *k + { + const void *ns = NULL; + spin_lock(&sysfs_assoc_lock); +- if (targ->sd) ++ if (targ->sd && sysfs_ns_type(kobj->sd)) + ns = targ->sd->s_ns; + spin_unlock(&sysfs_assoc_lock); + sysfs_hash_and_remove(kobj->sd, ns, name); @@ -9,6 +9,8 @@ gregkh/gkh-version.patch # Driver core patches for 2.6.35 ################################# driver-core.current/sysfs-don-t-allow-the-creation-of-symlinks-we-can-t-remove.patch +driver-core.current/sysfs-sysfs_delete_link-handle-symlinks-from-untagged-to-tagged-directories.patch +driver-core.current/sysfs-allow-creating-symlinks-from-untagged-to-tagged-directories.patch ################################# # TTY patches for 2.6.35 @@ -223,3 +225,4 @@ usb/usb-otg-ulpi-extend-the-generic-ulpi-driver.patch + |
