lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-Id: <200710071222.22218.dmitry.torokhov@gmail.com> Date: Sun, 7 Oct 2007 12:22:21 -0400 From: Dmitry Torokhov <dmitry.torokhov@...il.com> To: Linus Torvalds <torvalds@...ux-foundation.org> Cc: Andrew Morton <akpm@...ux-foundation.org>, Anssi Hannula <anssi.hannula@...il.com>, Andrey Borzenkov <arvidjaar@...l.ru>, Greg KH <greg@...ah.com>, Kay Sievers <kay.sievers@...y.org>, LKML <linux-kernel@...r.kernel.org> Subject: [PATCH for 2.6.23] Driver core: fix regression with SYSFS_DEPRECTATED Subject: Driver core: fix SYSF_DEPRECATED breakage for nested classdevs From: Dmitry Torokhov <dmitry.torokhov@...il.com> We should only reparent to a class former class devices that form the base of class hierarchy. Nested devices should still grow from their real parents. Signed-off-by: Dmitry Torokhov <dtor@...l.ru> Tested-by: Andrey Borzenkov <arvidjaar@...l.ru> Tested-by: Anssi Hannula <anssi.hannula@...il.com> --- Linus, Please consider applying this patch before releasing 2.6.23. It fixes a regression in UDEV/HAL caused by conversion of input devices from class devices to regular devices. Thanks, Dmitry Index: linux/drivers/base/core.c =================================================================== --- linux.orig/drivers/base/core.c +++ linux/drivers/base/core.c @@ -586,9 +586,13 @@ void device_initialize(struct device *de static struct kobject * get_device_parent(struct device *dev, struct device *parent) { - /* Set the parent to the class, not the parent device */ - /* this keeps sysfs from having a symlink to make old udevs happy */ - if (dev->class) + /* + * Set the parent to the class, not the parent device + * for topmost devices in class hierarchy. + * This keeps sysfs from having a symlink to make old + * udevs happy + */ + if (dev->class && (!parent || parent->class != dev->class)) return &dev->class->subsys.kobj; else if (parent) return &parent->kobj; \\ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists