Messages in this thread | | | Date | Mon, 19 Aug 2013 19:02:40 -0400 | From | Tejun Heo <> | Subject | Re: [PATCH] writeback: fix NULL dereference when device is gone |
| |
On Tue, Aug 20, 2013 at 12:45:53AM +0200, Peter Wu wrote: > diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c > index 68851ff..6e38a8b 100644 > --- a/fs/fs-writeback.c > +++ b/fs/fs-writeback.c > @@ -1007,7 +1007,8 @@ void bdi_writeback_workfn(struct work_struct *work) > struct backing_dev_info *bdi = wb->bdi; > long pages_written; > > - set_worker_desc("flush-%s", dev_name(bdi->dev)); > + if (bdi->dev) > + set_worker_desc("flush-%s", dev_name(bdi->dev));
Hmmm... bdi->dev is cleared after bdi_wb_shutdown() so the work item should no longer be running. It seems like something is queueing the work item after shutdown and the proper fix would be finding out which and fixing it. Can you please verify whether adding WARN_ON(!bdi->dev) in bdi_wakeup_thread_delayed() trigger anything?
Thanks.
-- tejun
| |