Commit 1d0dbc3d authored by Linus Torvalds's avatar Linus Torvalds

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
parents 4515866d bca4104b
...@@ -3497,7 +3497,8 @@ static int alloc_chain_hlocks(int req) ...@@ -3497,7 +3497,8 @@ static int alloc_chain_hlocks(int req)
size = chain_block_size(curr); size = chain_block_size(curr);
if (likely(size >= req)) { if (likely(size >= req)) {
del_chain_block(0, size, chain_block_next(curr)); 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; return curr;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment