From: Xiaotian Feng Date: Tue, 4 Dec 2012 11:33:54 +0000 (+0800) Subject: megaraid: fix BUG_ON() from incorrect use of delayed work X-Git-Tag: v3.7~19^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c1d390d8e6128b050f0f66b1c33d390760deb3f4;p=pandora-kernel.git 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 Signed-off-by: Tejun Heo Cc: Neela Syam Kolli Cc: "James E.J. Bottomley" Cc: linux-scsi@vger.kernel.org --- Reading git-diff-tree failed