+ lib-fix-the-null-vs-is_err-bug-for-debugfs_create_dir.patch added to mm-nonmm-unstable branch

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

 



The patch titled
     Subject: lib: fix the NULL vs IS_ERR() bug for debugfs_create_dir()
has been added to the -mm mm-nonmm-unstable branch.  Its filename is
     lib-fix-the-null-vs-is_err-bug-for-debugfs_create_dir.patch

This patch will shortly appear at
     https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/lib-fix-the-null-vs-is_err-bug-for-debugfs_create_dir.patch

This patch will later appear in the mm-nonmm-unstable branch at
    git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

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 via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days

------------------------------------------------------
From: Yang Ruibin <11162571@xxxxxxxx>
Subject: lib: fix the NULL vs IS_ERR() bug for debugfs_create_dir()
Date: Wed, 21 Aug 2024 03:34:40 -0400

debugfs_create_dir() returns error pointers.  It never returns NULL.  So
use IS_ERR() to check it.

Link: https://lkml.kernel.org/r/20240821073441.9701-1-11162571@xxxxxxxx
Signed-off-by: Yang Ruibin <11162571@xxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 lib/test_fpu_glue.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/lib/test_fpu_glue.c~lib-fix-the-null-vs-is_err-bug-for-debugfs_create_dir
+++ a/lib/test_fpu_glue.c
@@ -42,7 +42,7 @@ static int __init test_fpu_init(void)
 		return -EINVAL;
 
 	selftest_dir = debugfs_create_dir("selftest_helpers", NULL);
-	if (!selftest_dir)
+	if (IS_ERR(selftest_dir))
 		return -ENOMEM;
 
 	debugfs_create_file_unsafe("test_fpu", 0444, selftest_dir, NULL,
_

Patches currently in -mm which might be from 11162571@xxxxxxxx are

lib-fix-the-null-vs-is_err-bug-for-debugfs_create_dir.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