Skip to content

Commit 1d0dbc3

Browse files
committed
Merge tag 'locking-urgent-2023-11-26' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull locking fix from Ingo Molnar: "Fix lockdep block chain corruption resulting in KASAN warnings" * tag 'locking-urgent-2023-11-26' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: lockdep: Fix block chain corruption
2 parents 4515866 + bca4104 commit 1d0dbc3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

kernel/locking/lockdep.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3497,7 +3497,8 @@ static int alloc_chain_hlocks(int req)
34973497
size = chain_block_size(curr);
34983498
if (likely(size >= req)) {
34993499
del_chain_block(0, size, chain_block_next(curr));
3500-
add_chain_block(curr + req, size - req);
3500+
if (size > req)
3501+
add_chain_block(curr + req, size - req);
35013502
return curr;
35023503
}
35033504
}

0 commit comments

Comments
 (0)