[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4DE5DC3A.4070303@kernel.dk>
Date: Wed, 01 Jun 2011 08:29:14 +0200
From: Jens Axboe <axboe@...nel.dk>
To: Tejun Heo <tj@...nel.org>
CC: linux-kernel@...r.kernel.org, davem@...emloft.net
Subject: Re: [PATCH] block: blkdev_get() should acess ->bd_disk only after
success
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists