[folded-merged] kasan-detect-negative-size-in-memory-operation-function-fix-2.patch removed from -mm tree

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

 



The patch titled
     Subject: kasan-detect-negative-size-in-memory-operation-function-fix-2
has been removed from the -mm tree.  Its filename was
     kasan-detect-negative-size-in-memory-operation-function-fix-2.patch

This patch was dropped because it was folded into kasan-detect-negative-size-in-memory-operation-function.patch

------------------------------------------------------
From: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Subject: kasan-detect-negative-size-in-memory-operation-function-fix-2

fix objtool warning

mm/kasan/common.o: warning: objtool: kasan_report()+0x13: call to report_enabled() with UACCESS enabled


Link: http://lkml.kernel.org/r/20200305095436.GV2596@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Reported-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
Reviewed-by: Walter Wu <walter-zh.wu@xxxxxxxxxxxx>
Tested-by: Walter Wu <walter-zh.wu@xxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/kasan/common.c |   13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

--- a/mm/kasan/common.c~kasan-detect-negative-size-in-memory-operation-function-fix-2
+++ a/mm/kasan/common.c
@@ -641,16 +641,17 @@ extern bool report_enabled(void);
 
 bool kasan_report(unsigned long addr, size_t size, bool is_write, unsigned long ip)
 {
-	unsigned long flags;
+	unsigned long flags = user_access_save();
+	bool ret = false;
 
-	if (likely(!report_enabled()))
-		return false;
+	if (likely(report_enabled())) {
+		__kasan_report(addr, size, is_write, ip);
+		ret = true;
+	}
 
-	flags = user_access_save();
-	__kasan_report(addr, size, is_write, ip);
 	user_access_restore(flags);
 
-	return true;
+	return ret;
 }
 
 #ifdef CONFIG_MEMORY_HOTPLUG
_

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

kasan-detect-negative-size-in-memory-operation-function.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