summaryrefslogtreecommitdiffstats
path: root/fs/freevxfs/vxfs_inode.c
diff options
context:
space:
mode:
authorDmitriy Monakhov <dmonakhov@sw.ru>2007-05-08 00:24:34 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-08 11:14:59 -0700
commit82f703bb8cb2732b4437a9f555a1be564e9e71c2 (patch)
tree14b96636cc447ff00a5c3da0aa8d114f982b6cea /fs/freevxfs/vxfs_inode.c
parent1368c4f2482c9e06bcb297217433818b171cc9e3 (diff)
downloadop-kernel-dev-82f703bb8cb2732b4437a9f555a1be564e9e71c2.zip
op-kernel-dev-82f703bb8cb2732b4437a9f555a1be564e9e71c2.tar.gz
freevxfs: possible null pointer dereference fix
sb_read may return NULL, so let's explicitly check it. Signed-off-by: Dmitriy Monakhov <dmonakhov@openvz.org> Acked-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/freevxfs/vxfs_inode.c')
-rw-r--r--fs/freevxfs/vxfs_inode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/freevxfs/vxfs_inode.c b/fs/freevxfs/vxfs_inode.c
index 098a915..d1f7c5b 100644
--- a/fs/freevxfs/vxfs_inode.c
+++ b/fs/freevxfs/vxfs_inode.c
@@ -99,7 +99,7 @@ vxfs_blkiget(struct super_block *sbp, u_long extent, ino_t ino)
offset = ((ino % (sbp->s_blocksize / VXFS_ISIZE)) * VXFS_ISIZE);
bp = sb_bread(sbp, block);
- if (buffer_mapped(bp)) {
+ if (bp && buffer_mapped(bp)) {
struct vxfs_inode_info *vip;
struct vxfs_dinode *dip;
OpenPOWER on IntegriCloud