aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrĂ© Almeida <[email protected]>2019-07-11 20:53:43 -0700
committerLinus Torvalds <[email protected]>2019-07-12 11:05:42 -0700
commit4e4dfce2278929de4379cdcfa2335dad7a6c4aa0 (patch)
treef38ab4af723210c0590d7571d53176811eed0a21
parent6ef9056952532c3b746de46aa10d45b4d7797bd8 (diff)
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/[email protected] Signed-off-by: AndrĂ© Almeida <[email protected]> Reviewed-by: Andrew Morton <[email protected]> Acked-by: Catalin Marinas <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r--mm/kmemleak.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/kmemleak.c b/mm/kmemleak.c
index 3e147ea83182..aa8f4fa93ca3 100644
--- a/mm/kmemleak.c
+++ b/mm/kmemleak.c
@@ -1866,7 +1866,7 @@ static ssize_t kmemleak_write(struct file *file, const char __user *user_buf,
}
if (!kmemleak_enabled) {
- ret = -EBUSY;
+ ret = -EPERM;
goto out;
}