From 0fac4a277d94b1b828c7f53a714a93655f063c4c Mon Sep 17 00:00:00 2001 From: Thomas Schoebel-Theuer Date: Mon, 1 Mar 2021 12:11:43 +0100 Subject: [PATCH] mem: safeguard hash_fn --- kernel/brick_mem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/brick_mem.c b/kernel/brick_mem.c index daf116bf..9f093c5f 100644 --- a/kernel/brick_mem.c +++ b/kernel/brick_mem.c @@ -443,7 +443,7 @@ static void _new_block_info(void *data, int len, int cline) { struct mem_block_info *inf; - int hash; + unsigned int hash; unsigned long flags; for (;;) { @@ -469,7 +469,7 @@ struct mem_block_info *_find_block_info(void *data, bool remove) { struct mem_block_info *res = NULL; struct list_head *tmp; - int hash = INFO_LIST_HASH(data); + unsigned int hash = INFO_LIST_HASH(data); unsigned long flags; if (remove)