mm-commits.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [folded-merged] kasan-detect-negative-size-in-memory-operation-function-fix-2.patch removed from -mm tree
@ 2020-04-02  3:33 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2020-04-02  3:33 UTC (permalink / raw)
  To: mm-commits, peterz, rdunlap, walter-zh.wu


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@infradead.org>
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@hirez.programming.kicks-ass.net
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Reviewed-by: Walter Wu <walter-zh.wu@mediatek.com>
Tested-by: Walter Wu <walter-zh.wu@mediatek.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 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@infradead.org are

kasan-detect-negative-size-in-memory-operation-function.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-04-02  3:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-02  3:33 [folded-merged] kasan-detect-negative-size-in-memory-operation-function-fix-2.patch removed from -mm tree akpm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).