mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
jfs: UBSAN: shift-out-of-bounds in dbFindBits
[ Upstream commit b0b2fc815e514221f01384f39fbfbff65d897e1c ] Fix issue with UBSAN throwing shift-out-of-bounds warning. Reported-by: syzbot+e38d703eeb410b17b473@syzkaller.appspotmail.com Signed-off-by: Remington Brasga <rbrasga@uci.edu> Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
cf6f3ebd63
commit
f04925a02e
1 changed files with 1 additions and 1 deletions
|
@ -3022,7 +3022,7 @@ static int dbFindBits(u32 word, int l2nb)
|
|||
|
||||
/* scan the word for nb free bits at nb alignments.
|
||||
*/
|
||||
for (bitno = 0; mask != 0; bitno += nb, mask >>= nb) {
|
||||
for (bitno = 0; mask != 0; bitno += nb, mask = (mask >> nb)) {
|
||||
if ((mask & word) == mask)
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue