All of lore.kernel.org
 help / color / mirror / Atom feed
* + kasan-improve-vmalloc-tests-fix-3-fix.patch added to -mm tree
@ 2022-02-24  3:06 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2022-02-24  3:06 UTC (permalink / raw)
  To: mm-commits, lkp, elver, andreyknvl, akpm, akpm


The patch titled
     Subject: kasan-improve-vmalloc-tests-fix-3-fix
has been added to the -mm tree.  Its filename is
     kasan-improve-vmalloc-tests-fix-3-fix.patch

This patch should soon appear at
    https://ozlabs.org/~akpm/mmots/broken-out/kasan-improve-vmalloc-tests-fix-3-fix.patch
and later at
    https://ozlabs.org/~akpm/mmotm/broken-out/kasan-improve-vmalloc-tests-fix-3-fix.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: Andrew Morton <akpm@linux-foundation.org>
Subject: kasan-improve-vmalloc-tests-fix-3-fix

fix build

lib/test_kasan.c: In function 'vmalloc_helpers_tags':
lib/test_kasan.c:1073:13: error: unused variable 'rv' [-Werror=unused-variable]
 1073 |         int rv;
      |             ^~
cc1: all warnings being treated as errors

Cc: Andrey Konovalov <andreyknvl@google.com>
Cc: kernel test robot <lkp@intel.com>
Cc: Marco Elver <elver@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 lib/test_kasan.c |   15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

--- a/lib/test_kasan.c~kasan-improve-vmalloc-tests-fix-3-fix
+++ a/lib/test_kasan.c
@@ -1061,7 +1061,6 @@ static void kmalloc_double_kzfree(struct
 static void vmalloc_helpers_tags(struct kunit *test)
 {
 	void *ptr;
-	int rv;
 
 	/* This test is intended for tag-based modes. */
 	KASAN_TEST_NEEDS_CONFIG_OFF(test, CONFIG_KASAN_GENERIC);
@@ -1080,11 +1079,15 @@ static void vmalloc_helpers_tags(struct
 	KUNIT_ASSERT_NOT_ERR_OR_NULL(test, vmalloc_to_page(ptr));
 
 #if !IS_MODULE(CONFIG_KASAN_KUNIT_TEST)
-	/* Make sure vmalloc'ed memory permissions can be changed. */
-	rv = set_memory_ro((unsigned long)ptr, 1);
-	KUNIT_ASSERT_GE(test, rv, 0);
-	rv = set_memory_rw((unsigned long)ptr, 1);
-	KUNIT_ASSERT_GE(test, rv, 0);
+	{
+		int rv;
+
+		/* Make sure vmalloc'ed memory permissions can be changed. */
+		rv = set_memory_ro((unsigned long)ptr, 1);
+		KUNIT_ASSERT_GE(test, rv, 0);
+		rv = set_memory_rw((unsigned long)ptr, 1);
+		KUNIT_ASSERT_GE(test, rv, 0);
+	}
 #endif
 
 	vfree(ptr);
_

Patches currently in -mm which might be from akpm@linux-foundation.org are

mm.patch
kasan-improve-vmalloc-tests-fix-3-fix.patch
documentation-vm-page_ownerrst-update-the-documentation-fix.patch
x86-mm-enable-arch_has_vm_get_page_prot-fix.patch
mm-mempolicy-convert-from-atomic_t-to-refcount_t-on-mempolicy-refcnt-fix.patch
mm-handle-uninitialized-numa-nodes-gracefully-fix.patch
mm-memory_hotplug-remove-obsolete-comment-of-__add_pages-fix.patch
proc-alloc-path_max-bytes-for-proc-pid-fd-symlinks-fix.patch
linux-next-rejects.patch
mutex-subsystem-synchro-test-module-fix.patch
kernel-forkc-export-kernel_thread-to-modules.patch


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

only message in thread, other threads:[~2022-02-24  3:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-24  3:06 + kasan-improve-vmalloc-tests-fix-3-fix.patch added to -mm tree Andrew Morton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.