Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'block-6.6-2023-10-27' of git://git.kernel.dk/linux

Pull block fix from Jens Axboe:
"Just a single fix for a potential divide-by-zero, introduced in this
cycle"

* tag 'block-6.6-2023-10-27' of git://git.kernel.dk/linux:
blk-throttle: check for overflow in calculate_bytes_allowed

+6
+6
block/blk-throttle.c
··· 723 723 724 724 static u64 calculate_bytes_allowed(u64 bps_limit, unsigned long jiffy_elapsed) 725 725 { 726 + /* 727 + * Can result be wider than 64 bits? 728 + * We check against 62, not 64, due to ilog2 truncation. 729 + */ 730 + if (ilog2(bps_limit) + ilog2(jiffy_elapsed) - ilog2(HZ) > 62) 731 + return U64_MAX; 726 732 return mul_u64_u64_div_u64(bps_limit, (u64)jiffy_elapsed, (u64)HZ); 727 733 } 728 734