diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-02-04 11:39:23 +0100 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-02-04 15:21:06 +0100 |
commit | d7b113dced48aaaba6db262db2ed420b47917896 (patch) | |
tree | 1194ab45f3c3521b67c23118bf1fcd93c16830a9 /kern | |
parent | 80d642898f5a95025afd3e5ee70e01cce0857845 (diff) |
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.
Diffstat (limited to 'kern')
-rw-r--r-- | kern/slab.c | 4 |
1 files changed, 2 insertions, 2 deletions
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__, \ |