Staging
v0.8.1
https://github.com/torvalds/linux
Revision 4c49ff3fe128ca68dabd07537415c419ad7f82f9 authored by Tejun Heo on 01 June 2011, 06:27:41 UTC, committed by Jens Axboe on 01 June 2011, 06:28:47 UTC
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.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: David Miller <davem@davemloft.net>
Tested-by: David Miller <davem@davemloft.net>
Cc: stable@kernel.org
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
1 parent 4495a7d
History
Tip revision: 4c49ff3fe128ca68dabd07537415c419ad7f82f9 authored by Tejun Heo on 01 June 2011, 06:27:41 UTC
block: blkdev_get() should access ->bd_disk only after success
Tip revision: 4c49ff3
File Mode Size
Documentation
arch
block
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.gitignore -rw-r--r-- 966 bytes
.mailmap -rw-r--r-- 4.2 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 91.9 KB
Kbuild -rw-r--r-- 2.4 KB
Kconfig -rw-r--r-- 252 bytes
MAINTAINERS -rw-r--r-- 189.7 KB
Makefile -rw-r--r-- 52.6 KB
README -rw-r--r-- 17.1 KB
REPORTING-BUGS -rw-r--r-- 3.3 KB

README

back to top