diff options
author | Remington Brasga <rbrasga@uci.edu> | 2024-07-10 00:12:44 +0000 |
---|---|---|
committer | Dave Kleikamp <dave.kleikamp@oracle.com> | 2024-08-23 13:14:28 -0500 |
commit | b0b2fc815e514221f01384f39fbfbff65d897e1c (patch) | |
tree | c0ccf010035405bbb068488674a3dd4d17e1200f /fs/jfs | |
parent | 3d5f968a177d468cd13568ef901c5be84d83d32b (diff) |
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>
Diffstat (limited to 'fs/jfs')
-rw-r--r-- | fs/jfs/jfs_dmap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/jfs/jfs_dmap.c b/fs/jfs/jfs_dmap.c index 5713994328cb..ccdfa38d7a68 100644 --- a/fs/jfs/jfs_dmap.c +++ b/fs/jfs/jfs_dmap.c @@ -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; } |