[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20121204153939.GD3885@mtj.dyndns.org>
Date: Tue, 4 Dec 2012 07:39:39 -0800
From: Tejun Heo <tj@...nel.org>
To: Xiaotian Feng <xtfeng@...il.com>
Cc: linux-kernel@...r.kernel.org,
Xiaotian Feng <dannyfeng@...cent.com>,
Neela Syam Kolli <megaraidlinux@....com>,
"James E.J. Bottomley" <JBottomley@...allels.com>,
linux-scsi@...r.kernel.org
Subject: Re: [PATCH] megaraid: fix use of delayed work
On Tue, Dec 04, 2012 at 07:33:54PM +0800, Xiaotian Feng wrote:
> 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, schedule_delayed_work() will check dwork->timer before
> queue_work, this will cause megaraid code to hit the BUG_ON in workqueue code.
> Change megaraid code to use delayed work.
>
> Signed-off-by: Xiaotian Feng <dannyfeng@...cent.com>
> Cc: Tejun Heo <tj@...nel.org>
> Cc: Neela Syam Kolli <megaraidlinux@....com>
> Cc: "James E.J. Bottomley" <JBottomley@...allels.com>
> Cc: linux-scsi@...r.kernel.org
Urgh... what the.... Didn't see that one coming. I'm gonna push this
to Linus through the workqueue tree.
Thanks for the fix.
--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists