summaryrefslogtreecommitdiffstats
path: root/init/do_mounts.c
diff options
context:
space:
mode:
authorSigned-off-by: Jan Kara <jack@suse.cz>2010-09-16 20:36:36 +0200
committerJens Axboe <jaxboe@fusionio.com>2010-09-16 20:36:36 +0200
commit01ea50638bc04ca5259f5711fcdedefcdde1cf43 (patch)
treec525dc13b05feab90d71b78a1d7adb0ddde081ea /init/do_mounts.c
parent2786c4e5e54802c34297e55050fef3e862a27b3f (diff)
downloadlinux-01ea50638bc04ca5259f5711fcdedefcdde1cf43.tar.bz2
block: Fix race during disk initialization
When a new disk is being discovered, add_disk() first ties the bdev to gendisk (via register_disk()->blkdev_get()) and only after that calls bdi_register_bdev(). Because register_disk() also creates disk's kobject, it can happen that userspace manages to open and modify the device's data (or inode) before its BDI is properly initialized leading to a warning in __mark_inode_dirty(). Fix the problem by registering BDI early enough. This patch addresses https://bugzilla.kernel.org/show_bug.cgi?id=16312 Cc: stable@kernel.org Reported-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'init/do_mounts.c')
0 files changed, 0 insertions, 0 deletions