mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 04:18:39 +08:00
jfs: UBSAN: shift-out-of-bounds in dbFindBits
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>
This commit is contained in:
parent
3d5f968a17
commit
b0b2fc815e
@ -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…
Reference in New Issue
Block a user