diff options
| author | Coly Li <[email protected]> | 2025-03-09 16:05:56 +0000 |
|---|---|---|
| committer | Jens Axboe <[email protected]> | 2025-03-10 13:41:58 +0000 |
| commit | 7e76336e14de9a2b67af96012ddd46c5676cf340 (patch) | |
| tree | ab197e8a5e2b5e75f1c01ae3e4fbbb2a826c3db6 /net/unix/sysctl_net_unix.c | |
| parent | block: make sure ->nr_integrity_segments is cloned in blk_rq_prep_clone (diff) | |
| download | kernel-7e76336e14de9a2b67af96012ddd46c5676cf340.tar.gz kernel-7e76336e14de9a2b67af96012ddd46c5676cf340.zip | |
badblocks: Fix a nonsense WARN_ON() which checks whether a u64 variable < 0
In _badblocks_check(), there are lines of code like this,
1246 sectors -= len;
[snipped]
1251 WARN_ON(sectors < 0);
The WARN_ON() at line 1257 doesn't make sense because sectors is
unsigned long long type and never to be <0.
Fix it by checking directly checking whether sectors is less than len.
Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Coly Li <[email protected]>
Reviewed-by: Yu Kuai <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'net/unix/sysctl_net_unix.c')
0 files changed, 0 insertions, 0 deletions
