All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rabin Vincent <rabin@rab.in>
To: Chanho Min <chanho0207@gmail.com>
Cc: Wu Fengguang <fengguang.wu@intel.com>,
	Jens Axboe <axboe@kernel.dk>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/backing-dev.c: fix crash when USB/SCSI device is detached
Date: Thu, 19 Jan 2012 01:13:21 +0530	[thread overview]
Message-ID: <CAH+eYFBkm+D_N2tF8F_Pdk8qbVeTFcNefeJ6ROcDW3vLgsCGcw@mail.gmail.com> (raw)
In-Reply-To: <CAOAMb1B7oENhPzgUkFjzuJ0==dnHRJkmHFSq-7QtSGeV6JeBvA@mail.gmail.com>

On Mon, Jan 16, 2012 at 12:04, Chanho Min <chanho0207@gmail.com> wrote:
>> But wait.. Rabin's patch actually fixes the NULL deference in
>> the call
>>
>>        trace_writeback_wake_forker_thread(bdi);
>>
>> The wakeup of the forker thread should be harmless.
>>
> The forker thread shoud not be woken up after the bdi is unregistered.
> Is this also Rabin's intention?
> Also, I'm not sure the wakeup of the forker thread is harmless as bellows.
> ..
> case FORK_THREAD:
> ..
>  task = kthread_create(bdi_writeback_thread, &bdi->wb,
>                      "flush-%s", dev_name(bdi->dev));

By the time the bdi->dev is made NULL, the bdi has been removed from the
bdi_list (in bdi_wb_shutdown()), so even if the forker thread is woken
up after that it will not find the bdi and won't get to this part of the
code.

  reply	other threads:[~2012-01-18 19:44 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-05  8:49 [PATCH] mm/backing-dev.c: fix crash when USB/SCSI device is detached Chanho Min
2012-01-15 10:28 ` Rabin Vincent
2012-01-15 12:58   ` Wu Fengguang
2012-01-15 15:41     ` Rabin Vincent
2012-01-16  2:53       ` Wu Fengguang
2012-01-16  5:28         ` Chanho Min
2012-01-16  5:50           ` Wu Fengguang
2012-01-16  5:53             ` Wu Fengguang
2012-01-16  6:34               ` Chanho Min
2012-01-18 19:43                 ` Rabin Vincent [this message]
2012-01-19 16:50         ` [PATCHv2] backing-dev: fix wakeup timer races with bdi_unregister() Rabin Vincent
2012-01-19 23:46           ` Namjae Jeon
2012-01-20  5:24             ` Rabin Vincent
2012-01-20  6:15               ` Namjae Jeon
2012-01-20 10:03                 ` Rabin Vincent
2012-01-20 11:18                   ` Namjae Jeon
2012-01-20 12:08                     ` Rabin Vincent
2012-01-20 15:04                       ` Namjae Jeon
2012-01-31 13:24           ` Wu Fengguang
  -- strict thread matches above, loose matches on Subject: below --
2012-01-03  3:47 [PATCH] mm/backing-dev.c: fix crash when USB/SCSI device is detached 'Chanho Min'
2012-01-03  3:47 'Chanho Min'
2012-01-02  9:38 민찬호
2012-01-02  9:38 민찬호
2012-01-02  9:57 ` Wu Fengguang
2012-01-02  9:57   ` Wu Fengguang
2012-01-03  3:23   ` Chanho Min
2012-01-03  3:23   ` Chanho Min
2012-01-03  4:49     ` Wu Fengguang
2012-01-03  4:49       ` Wu Fengguang
2012-01-03 11:22       ` Chanho Min
2012-01-03 11:22       ` Chanho Min

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAH+eYFBkm+D_N2tF8F_Pdk8qbVeTFcNefeJ6ROcDW3vLgsCGcw@mail.gmail.com \
    --to=rabin@rab.in \
    --cc=axboe@kernel.dk \
    --cc=chanho0207@gmail.com \
    --cc=fengguang.wu@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.