linux-sg2042/drivers/scsi/megaraid
Xiaotian Feng c1d390d8e6 megaraid: fix BUG_ON() from incorrect use of delayed work
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
2012-12-04 07:29:47 -08:00
..
Kconfig.megaraid
Makefile [SCSI] megaraid_sas: Add 9565/9285 specific code 2010-12-22 23:26:53 -06:00
mbox_defs.h Fix common misspellings 2011-03-31 11:26:23 -03:00
mega_common.h [SCSI] replace __FUNCTION__ with __func__ 2008-07-27 10:31:49 -04:00
megaraid_ioctl.h Convert asm/semaphore.h users to linux/semaphore.h 2008-04-18 22:22:54 -04:00
megaraid_mbox.c [SCSI] megaraid: remove a spurious IRQ enable 2012-07-20 08:58:39 +01:00
megaraid_mbox.h [SCSI] megaraid_mbox: fix Dell CERC firmware problem 2008-04-29 19:34:07 -05:00
megaraid_mm.c fix comment typos concerning "consistent" 2010-12-10 16:04:28 +01:00
megaraid_mm.h [SCSI] MegaRAID driver management char device moved to misc 2008-02-11 10:20:53 -06:00
megaraid_sas.h megaraid: fix BUG_ON() from incorrect use of delayed work 2012-12-04 07:29:47 -08:00
megaraid_sas_base.c megaraid: fix BUG_ON() from incorrect use of delayed work 2012-12-04 07:29:47 -08:00
megaraid_sas_fp.c [SCSI] megaraid_sas: Version, Changelog, Copyright update 2012-10-09 11:21:48 +01:00
megaraid_sas_fusion.c [SCSI] megaraid_sas: Version, Changelog, Copyright update 2012-10-09 11:21:48 +01:00
megaraid_sas_fusion.h [SCSI] megaraid_sas: Version, Changelog, Copyright update 2012-10-09 11:21:48 +01:00