Messages in this thread | | | Date | Tue, 31 Jan 2012 21:24:03 +0800 | From | Wu Fengguang <> | Subject | Re: [PATCHv2] backing-dev: fix wakeup timer races with bdi_unregister() |
| |
On Thu, Jan 19, 2012 at 10:20:20PM +0530, Rabin Vincent wrote: > While 7a401a972df8e18 ("backing-dev: ensure wakeup_timer is deleted") > addressed the problem of the bdi being freed with a queued wakeup > timer, there are other races that could happen if the wakeup timer > expires after/during bdi_unregister(), before bdi_destroy() is called. > > wakeup_timer_fn() could attempt to wakeup a task which has already has > been freed, or could access a NULL bdi->dev via the wake_forker_thread > tracepoint. > > Cc: Jens Axboe <axboe@kernel.dk> > Cc: Wu Fengguang <fengguang.wu@intel.com> > Reported-by: Chanho Min <chanho.min@lge.com> > Signed-off-by: Rabin Vincent <rabin@rab.in> > ---
Thanks. I just pushed it to linux-next, together with this related one:
Subject: writeback: fix NULL bdi->dev in trace writeback_single_inode Date: Tue Jan 17 11:18:56 CST 2012
bdi_prune_sb() resets sb->s_bdi to default_backing_dev_info when the tearing down the original bdi. Fix trace_writeback_single_inode to use sb->s_bdi=default_backing_dev_info rather than bdi->dev=NULL for a teared down bdi.
Reported-by: Rabin Vincent <rabin@rab.in> Tested-by: Rabin Vincent <rabin@rab.in> Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Thanks, Fengguang
| |