summaryrefslogtreecommitdiffstats
path: root/block/blk-barrier.c
diff options
context:
space:
mode:
authorSuresh Jayaraman <sjayaraman@suse.de>2009-09-30 10:53:48 +0200
committerJens Axboe <jens.axboe@oracle.com>2009-10-01 21:15:46 +0200
commit3bd0f0c763e497c8674b28e3df2732f48683dabd (patch)
treefd3bb8635291ad8c0b4e302e40cc776fd1644ada /block/blk-barrier.c
parenta112a71d45b5e40c3cf07371d20a4a5079a72610 (diff)
swapfile: avoid NULL pointer dereference in swapon when s_bdev is NULL
While testing Swap over NFS patchset, I noticed an oops that was triggered during swapon. Investigating further, the NULL pointer deference is due to the SSD device check/optimization in the swapon code that assumes s_bdev could never be NULL. inode->i_sb->s_bdev could be NULL in a few cases. For e.g. one such case is loopback NFS mount, there could be others as well. Fix this by ensuring s_bdev is not NULL before we try to deference s_bdev. Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/blk-barrier.c')
0 files changed, 0 insertions, 0 deletions