[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-m68k
Subject:    [PATCH 1/3] m68k: Return directly after a failed capable() in sys_cacheflush()
From:       SF Markus Elfring <elfring () users ! sourceforge ! net>
Date:       2017-01-18 16:47:33
Message-ID: 71513091-bc01-ce70-893f-3f376062d833 () users ! sourceforge ! net
[Download RAW message or body]

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 18 Jan 2017 16:30:36 +0100

Return directly after a call of the function "capable" failed
at the beginning.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 arch/m68k/kernel/sys_m68k.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/m68k/kernel/sys_m68k.c b/arch/m68k/kernel/sys_m68k.c
index 9aa01adb407f..62bfeb3716a7 100644
--- a/arch/m68k/kernel/sys_m68k.c
+++ b/arch/m68k/kernel/sys_m68k.c
@@ -384,9 +384,8 @@ sys_cacheflush (unsigned long addr, int scope, int cache, unsigned long len)
 
 	if (scope == FLUSH_SCOPE_ALL) {
 		/* Only the superuser may explicitly flush the whole cache. */
-		ret = -EPERM;
 		if (!capable(CAP_SYS_ADMIN))
-			goto out;
+			return -EPERM;
 	} else {
 		struct vm_area_struct *vma;
 
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic