diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2023-11-26 19:30:11 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2023-11-26 19:30:11 +0300 |
commit | 1d0dbc3d16e8215838d9898d0191e8c0d2cc77af (patch) | |
tree | 31352f9cf670b298748036a9b9a5769c9ef1286d | |
parent | 4515866db1346d0b3d7c53214c60ff5373e39bb7 (diff) | |
parent | bca4104b00fec60be330cd32818dd5c70db3d469 (diff) | |
download | linux-1d0dbc3d16e8215838d9898d0191e8c0d2cc77af.tar.xz |
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
-rw-r--r-- | kernel/locking/lockdep.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c index e85b5ad3e206..151bd3de5936 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -3497,7 +3497,8 @@ static int alloc_chain_hlocks(int req) size = chain_block_size(curr); if (likely(size >= req)) { del_chain_block(0, size, chain_block_next(curr)); - add_chain_block(curr + req, size - req); + if (size > req) + add_chain_block(curr + req, size - req); return curr; } } |