]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] Driver core: potentially fix use after free in class_device_attr_show
authorManeesh Soni <maneesh@in.ibm.com>
Tue, 16 Aug 2005 22:15:48 +0000 (15:15 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 17 Aug 2005 04:06:24 +0000 (21:06 -0700)
commite9fb248dfe6e20b6012c3cf828784e9d4adbe531
tree86265a0aa2a8007e181e9edb279b2fab81b812ee
parent650d71f89f019a14275f650b2801911b938b54d6
[PATCH] Driver core: potentially fix use after free in class_device_attr_show

This moves the code to free devt_attr from class_device_del() to
class_dev_release() which is called after the last reference to the
corresponding kobject() is gone.

This allows us to keep the devt_attr alive while the corresponding
sysfs file is open.

Signed-off-by: Maneesh Soni <maneesh@in.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/base/class.c