lkml.org 
[lkml]   [2013]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2013-08-20 01:21    [W:0.848 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site