+ mm-slab-sanity-check-page-type-when-looking-up-cache-fix.patch added to -mm tree

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

 



The patch titled
     Subject: mm/slab: restore IRQs in kfree()
has been added to the -mm tree.  Its filename is
     mm-slab-sanity-check-page-type-when-looking-up-cache-fix.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/mm-slab-sanity-check-page-type-when-looking-up-cache-fix.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/mm-slab-sanity-check-page-type-when-looking-up-cache-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: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Subject: mm/slab: restore IRQs in kfree()

We added a new return here but we need to restore the IRQs before we
leave.

Link: http://lkml.kernel.org/r/20190613065637.GE16334@mwanda
Fixes: 4f5d94fd4ed5 ("mm/slab: sanity-check page type when looking up cache")
Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Cc: Kees Cook <keescook@xxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/slab.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/mm/slab.c~mm-slab-sanity-check-page-type-when-looking-up-cache-fix
+++ a/mm/slab.c
@@ -3745,8 +3745,10 @@ void kfree(const void *objp)
 	local_irq_save(flags);
 	kfree_debugcheck(objp);
 	c = virt_to_cache(objp);
-	if (!c)
+	if (!c) {
+		local_irq_restore(flags);
 		return;
+	}
 	debug_check_no_locks_freed(objp, c->object_size);
 
 	debug_check_no_obj_freed(objp, c->object_size);
_

Patches currently in -mm which might be from dan.carpenter@xxxxxxxxxx are

mm-slab-sanity-check-page-type-when-looking-up-cache-fix.patch
coda-get-rid-of-coda_alloc.patch
coda-get-rid-of-coda_free.patch
rapidio-mport_cdev-nul-terminate-some-strings.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