mm/slab: restore IRQs in kfree()
Subsystems (2)
PATCH 1/1 mm/slab: restore IRQs in kfree()
We added a new return here but we need to restore the IRQs before we leave.
Fixes 4f5d94fd4ed5 ("mm/slab: sanity-check page type when looking up cache")
Signed-off-by Dan Carpenter <[email protected]>
--- mm/slab.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
mm/slab.c +3 -1
@@ -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);
Signature · 1 line
2.20.1
Quoted 5 lines · Dan Carpenter
We added a new return here but we need to restore the IRQs before we leave.
Fixes 4f5d94fd4ed5 ("mm/slab: sanity-check page type when looking up cache")Signed-off-by Dan Carpenter <[email protected]>
Oh yes! Thank you for that catch! Andrew, if you haven't already, can you pick this up?
Thanks!
-Kees
Quoted 23 lines
--- mm/slab.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)mm/slab.c +3
-1@@ -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);Signature · 1 line
2.20.1
Signature · 1 line
Kees Cook