Re: [PATCH] mm/backing-dev.c: fix crash when USB/SCSI device is detached
From: Chanho Min
Date: Mon Jan 16 2012 - 00:28:29 EST
On Mon, Jan 16, 2012 at 11:53 AM, Wu Fengguang <fengguang.wu@xxxxxxxxx> wrote:
> On Sun, Jan 15, 2012 at 09:11:07PM +0530, Rabin Vincent wrote:
>> On Sun, Jan 15, 2012 at 08:58:53PM +0800, Wu Fengguang wrote:
>> > On Sun, Jan 15, 2012 at 03:58:43PM +0530, Rabin Vincent wrote:
>> > > diff --git a/mm/backing-dev.c b/mm/backing-dev.c
>> > > index 71034f4..a39ad70 100644
>> > > --- a/mm/backing-dev.c
>> > > +++ b/mm/backing-dev.c
>> > > @@ -318,7 +318,7 @@ static void wakeup_timer_fn(unsigned long data)
>> > > if (bdi->wb.task) {
>> > > trace_writeback_wake_thread(bdi);
>> > > wake_up_process(bdi->wb.task);
>> > > - } else {
>> > > + } else if (bdi->dev) {
>> > > /*
>> > > * When bdi tasks are inactive for long time, they are killed.
>> > > * In this case we have to wake-up the forker thread which
>> > > @@ -584,6 +584,8 @@ EXPORT_SYMBOL(bdi_register_dev);
>> > > */
>> > > static void bdi_wb_shutdown(struct backing_dev_info *bdi)
>> > > {
>> > > + struct task_struct *task = NULL;
Thanks, I fully understand.
In addition, Would not bdi_wakeup_flusher also be fixed?