From d7b113dced48aaaba6db262db2ed420b47917896 Mon Sep 17 00:00:00 2001 From: Justus Winter <4winter@informatik.uni-hamburg.de> Date: Tue, 4 Feb 2014 11:39:23 +0100 Subject: kern: make kmem_error panic The slab allocator relies on the fact that kmem_cache_error does not return. Previously, kmem_error was using printf. Use panic instead. Found using the Clang Static Analyzer. * kern/slab.c (kmem_error): Use panic instead of printf. --- kern/slab.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'kern') diff --git a/kern/slab.c b/kern/slab.c index adf07e7..f40afa1 100644 --- a/kern/slab.c +++ b/kern/slab.c @@ -289,8 +289,8 @@ vm_map_t kmem_map = &kmem_map_store; static unsigned long kmem_gc_last_tick; #define kmem_error(format, ...) \ - printf("mem: error: %s(): " format "\n", __func__, \ - ## __VA_ARGS__) + panic("mem: error: %s(): " format "\n", __func__, \ + ## __VA_ARGS__) #define kmem_warn(format, ...) \ printf("mem: warning: %s(): " format "\n", __func__, \ -- cgit v1.2.3