mm-commits.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [merged] reiserfs-prevent-null-pointer-dereference-in-reiserfs_insert_item.patch removed from -mm tree
@ 2020-01-31 23:21 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2020-01-31 23:21 UTC (permalink / raw)
  To: hushiyuan, jack, linfeilong, mm-commits, yeyunfeng, zhengbin13


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

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Yunfeng Ye <yeyunfeng@huawei.com>
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@huawei.com
Signed-off-by: Yunfeng Ye <yeyunfeng@huawei.com>
Cc: zhengbin <zhengbin13@huawei.com>
Cc: Hu Shiyuan <hushiyuan@huawei.com>
Cc: Feilong Lin <linfeilong@huawei.com>
Cc: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 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@huawei.com are

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

only message in thread, other threads:[~2020-01-31 23:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-31 23:21 [merged] reiserfs-prevent-null-pointer-dereference-in-reiserfs_insert_item.patch removed from -mm tree akpm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).