+ mm-kmemleak-change-error-at-_write-when-kmemleak-is-disabled.patch added to -mm tree

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

 



The patch titled
     Subject: mm/kmemleak.c: change error at _write when kmemleak is disabled
has been added to the -mm tree.  Its filename is
     mm-kmemleak-change-error-at-_write-when-kmemleak-is-disabled.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/mm-kmemleak-change-error-at-_write-when-kmemleak-is-disabled.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/mm-kmemleak-change-error-at-_write-when-kmemleak-is-disabled.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: André Almeida <andrealmeid@xxxxxxxxxxxxx>
Subject: mm/kmemleak.c: change error at _write when kmemleak is disabled

According to POSIX, EBUSY means that the "device or resource is busy", and
this can lead to people thinking that the file
`/sys/kernel/debug/kmemleak/` is somehow locked or being used by other
process.  Change this error code to a more appropriate one.

Link: http://lkml.kernel.org/r/20190612155231.19448-1-andrealmeid@xxxxxxxxxxxxx
Signed-off-by: André Almeida <andrealmeid@xxxxxxxxxxxxx>
Reviewed-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Cc: Catalin Marinas <catalin.marinas@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/kmemleak.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/mm/kmemleak.c~mm-kmemleak-change-error-at-_write-when-kmemleak-is-disabled
+++ a/mm/kmemleak.c
@@ -1866,7 +1866,7 @@ static ssize_t kmemleak_write(struct fil
 	}
 
 	if (!kmemleak_enabled) {
-		ret = -EBUSY;
+		ret = -EPERM;
 		goto out;
 	}
 
_

Patches currently in -mm which might be from andrealmeid@xxxxxxxxxxxxx are

mm-kmemleak-change-error-at-_write-when-kmemleak-is-disabled.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