+ reiserfs-prevent-null-pointer-dereference-in-reiserfs_insert_item.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: reiserfs: prevent NULL pointer dereference in reiserfs_insert_item()
has been added to the -mm tree.  Its filename is
     reiserfs-prevent-null-pointer-dereference-in-reiserfs_insert_item.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/reiserfs-prevent-null-pointer-dereference-in-reiserfs_insert_item.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/reiserfs-prevent-null-pointer-dereference-in-reiserfs_insert_item.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Yunfeng Ye <yeyunfeng@xxxxxxxxxx>
Subject: reiserfs: prevent NULL pointer dereference in reiserfs_insert_item()

The variable inode may be NULL in reiserfs_insert_item(), but there is
no check before accessing the member of inode.

Fix this by adding NULL pointer check before calling reiserfs_debug().

Link: http://lkml.kernel.org/r/79c5135d-ff25-1cc9-4e99-9f572b88cc00@xxxxxxxxxx
Signed-off-by: Yunfeng Ye <yeyunfeng@xxxxxxxxxx>
Cc: zhengbin <zhengbin13@xxxxxxxxxx>
Cc: Hu Shiyuan <hushiyuan@xxxxxxxxxx>
Cc: Feilong Lin <linfeilong@xxxxxxxxxx>
Cc: Jan Kara <jack@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/reiserfs/stree.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/fs/reiserfs/stree.c~reiserfs-prevent-null-pointer-dereference-in-reiserfs_insert_item
+++ a/fs/reiserfs/stree.c
@@ -2246,7 +2246,8 @@ error_out:
 	/* also releases the path */
 	unfix_nodes(&s_ins_balance);
 #ifdef REISERQUOTA_DEBUG
-	reiserfs_debug(th->t_super, REISERFS_DEBUG_CODE,
+	if (inode)
+		reiserfs_debug(th->t_super, REISERFS_DEBUG_CODE,
 		       "reiserquota insert_item(): freeing %u id=%u type=%c",
 		       quota_bytes, inode->i_uid, head2type(ih));
 #endif
_

Patches currently in -mm which might be from yeyunfeng@xxxxxxxxxx are

reiserfs-prevent-null-pointer-dereference-in-reiserfs_insert_item.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux