All of lore.kernel.org
 help / color / mirror / Atom feed
* + freevxfs-possible-null-pointer-dereference-fix.patch added to -mm tree
@ 2007-02-25 12:32 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2007-02-25 12:32 UTC (permalink / raw)
  To: mm-commits; +Cc: dmonakhov, dmonakhov, hch


The patch titled
     freevxfs: possible null pointer dereference fix
has been added to the -mm tree.  Its filename is
     freevxfs-possible-null-pointer-dereference-fix.patch

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: freevxfs: possible null pointer dereference fix
From: Dmitriy Monakhov <dmonakhov@sw.ru>

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>
---

 fs/freevxfs/vxfs_bmap.c  |    2 +-
 fs/freevxfs/vxfs_inode.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff -puN fs/freevxfs/vxfs_bmap.c~freevxfs-possible-null-pointer-dereference-fix fs/freevxfs/vxfs_bmap.c
--- a/fs/freevxfs/vxfs_bmap.c~freevxfs-possible-null-pointer-dereference-fix
+++ a/fs/freevxfs/vxfs_bmap.c
@@ -137,7 +137,7 @@ vxfs_bmap_indir(struct inode *ip, long i
 
 		bp = sb_bread(ip->i_sb,
 				indir + (i / VXFS_TYPED_PER_BLOCK(ip->i_sb)));
-		if (!buffer_mapped(bp))
+		if (!bp || !buffer_mapped(bp))
 			return 0;
 
 		typ = ((struct vxfs_typed *)bp->b_data) +
diff -puN fs/freevxfs/vxfs_inode.c~freevxfs-possible-null-pointer-dereference-fix fs/freevxfs/vxfs_inode.c
--- a/fs/freevxfs/vxfs_inode.c~freevxfs-possible-null-pointer-dereference-fix
+++ a/fs/freevxfs/vxfs_inode.c
@@ -99,7 +99,7 @@ vxfs_blkiget(struct super_block *sbp, u_
 	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;
 
_

Patches currently in -mm which might be from dmonakhov@sw.ru are

freevxfs-possible-null-pointer-dereference-fix.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-02-25 12:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-25 12:32 + freevxfs-possible-null-pointer-dereference-fix.patch added to -mm tree akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.