Revision c1d390d8e6128b050f0f66b1c33d390760deb3f4 authored by Xiaotian Feng on 04 December 2012, 11:33:54 UTC, committed by Tejun Heo on 04 December 2012, 15:29:47 UTC
megaraid use INIT_WORK to declare a hotplug_work, but cast the
hotplug_work from work_struct to delayed_work and
schedule_delayed_work on it.  This is very dangerous, as other part of
delayed_work might be kernel memories allocated by others.

With commit 8852aac ("workqueue: mod_delayed_work_on() shouldn't queue
timer on 0 delay"), schedule_delayed_work() will check dwork->timer
before queue_work even when @delay is 0, this causes megaraid code to
hit the BUG_ON() in workqueue code.  Change megaraid code to use
delayed work.

Signed-off-by: Xiaotian Feng <dannyfeng@tencent.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Neela Syam Kolli <megaraidlinux@lsi.com>
Cc: "James E.J. Bottomley" <JBottomley@parallels.com>
Cc: linux-scsi@vger.kernel.org
1 parent 8852aac
History
File Mode Size
partitions
Kconfig -rw-r--r-- 3.2 KB
Kconfig.iosched -rw-r--r-- 1.6 KB
Makefile -rw-r--r-- 720 bytes
blk-cgroup.c -rw-r--r-- 24.2 KB
blk-cgroup.h -rw-r--r-- 13.6 KB
blk-core.c -rw-r--r-- 81.0 KB
blk-exec.c -rw-r--r-- 3.2 KB
blk-flush.c -rw-r--r-- 13.1 KB
blk-integrity.c -rw-r--r-- 11.5 KB
blk-ioc.c -rw-r--r-- 10.2 KB
blk-iopoll.c -rw-r--r-- 5.9 KB
blk-lib.c -rw-r--r-- 6.9 KB
blk-map.c -rw-r--r-- 8.2 KB
blk-merge.c -rw-r--r-- 12.7 KB
blk-settings.c -rw-r--r-- 26.3 KB
blk-softirq.c -rw-r--r-- 4.5 KB
blk-sysfs.c -rw-r--r-- 15.5 KB
blk-tag.c -rw-r--r-- 9.7 KB
blk-throttle.c -rw-r--r-- 30.8 KB
blk-timeout.c -rw-r--r-- 4.7 KB
blk.h -rw-r--r-- 7.1 KB
bsg-lib.c -rw-r--r-- 6.2 KB
bsg.c -rw-r--r-- 23.7 KB
cfq-iosched.c -rw-r--r-- 108.1 KB
compat_ioctl.c -rw-r--r-- 20.8 KB
deadline-iosched.c -rw-r--r-- 11.1 KB
elevator.c -rw-r--r-- 23.0 KB
genhd.c -rw-r--r-- 43.4 KB
ioctl.c -rw-r--r-- 10.7 KB
noop-iosched.c -rw-r--r-- 2.5 KB
partition-generic.c -rw-r--r-- 14.0 KB
scsi_ioctl.c -rw-r--r-- 19.6 KB

back to top