All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wu Fengguang <fengguang.wu@intel.com>
To: Rabin Vincent <rabin@rab.in>
Cc: axboe@kernel.dk, linux-kernel@vger.kernel.org, chanho0207@gmail.com
Subject: Re: [PATCHv2] backing-dev: fix wakeup timer races with bdi_unregister()
Date: Tue, 31 Jan 2012 21:24:03 +0800	[thread overview]
Message-ID: <20120131132403.GA20016@localhost> (raw)
In-Reply-To: <1326991820-31393-1-git-send-email-rabin@rab.in>

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

      parent reply	other threads:[~2012-01-31 13:34 UTC|newest]

Thread overview: 19+ 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
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 [this message]

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=20120131132403.GA20016@localhost \
    --to=fengguang.wu@intel.com \
    --cc=axboe@kernel.dk \
    --cc=chanho0207@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rabin@rab.in \
    /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.