All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Tejun Heo <tj@kernel.org>
Cc: linux-kernel@vger.kernel.org, davem@davemloft.net
Subject: Re: [PATCH] block: blkdev_get() should acess ->bd_disk only after success
Date: Wed, 01 Jun 2011 08:29:14 +0200	[thread overview]
Message-ID: <4DE5DC3A.4070303@kernel.dk> (raw)
In-Reply-To: <20110531235647.GD9048@mtj.dyndns.org>

On 2011-06-01 01:56, Tejun Heo wrote:
> d4dc210f69 (block: don't block events on excl write for non-optical
> devices) added dereferencing of bdev->bd_disk to test
> GENHD_FL_BLOCK_EVENTS_ON_EXCL_WRITE; however, bdev->bd_disk can be
> %NULL if open failed which can lead to an oops.
> 
> Test the flag after testing open was successful, not before.

Thanks, applied.

-- 
Jens Axboe


      reply	other threads:[~2011-06-01  6:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-31 23:56 [PATCH] block: blkdev_get() should acess ->bd_disk only after success Tejun Heo
2011-06-01  6:29 ` Jens Axboe [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=4DE5DC3A.4070303@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@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.