device_schedule_callback() needs a module reference
authorAlan Stern <stern@rowland.harvard.edu>
Thu, 26 Apr 2007 07:12:04 +0000 (00:12 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 27 Apr 2007 17:57:32 +0000 (10:57 -0700)
commit523ded71de0c5e66973335bf99a80edfda9f401b
tree20f47e8ed91018977d9fb7f4169a6ef8db407b82
parentfa1a8c23eb7d3ded8a3c6d0e653339a2bc7fca9e
device_schedule_callback() needs a module reference

This patch (as896b) fixes an oversight in the design of
device_schedule_callback().  It is necessary to acquire a reference to the
module owning the callback routine, to prevent the module from being
unloaded before the callback can run.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: Satyam Sharma <satyam.sharma@gmail.com>
Cc: Neil Brown <neilb@suse.de>
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/base/core.c
fs/sysfs/file.c
include/linux/device.h
include/linux/sysfs.h