Dennis Zhou
526972e95e
percpu: do not search past bitmap when allocating an area
...
[ Upstream commit 8c43004af01635cc9fbb11031d070e5e0d327ef2 ]
pcpu_find_block_fit() guarantees that a fit is found within
PCPU_BITMAP_BLOCK_BITS. Iteration is used to determine the first fit as
it compares against the block's contig_hint. This can lead to
incorrectly scanning past the end of the bitmap. The behavior was okay
given the check after for bit_off >= end and the correctness of the
hints from pcpu_find_block_fit().
This patch fixes this by bounding the end offset by the number of bits
in a chunk.
Signed-off-by: Dennis Zhou <dennis@kernel.org >
Reviewed-by: Peng Fan <peng.fan@nxp.com >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2019-06-15 11:54:11 +02:00
..
2018-08-17 16:20:30 -07:00
2019-03-05 17:58:50 +01:00
2018-08-02 12:17:27 -06:00
2018-06-15 07:55:25 +09:00
2019-06-15 11:54:01 +02:00
2019-06-15 11:54:01 +02:00
2018-06-15 07:55:25 +09:00
2018-09-13 15:18:04 -10:00
2018-06-15 07:55:25 +09:00
2018-08-30 20:01:32 +02:00
2018-06-15 07:55:25 +09:00
2018-06-07 17:34:36 -07:00
2018-06-15 07:55:25 +09:00
2018-10-05 16:32:04 -07:00
2019-05-04 09:20:11 +02:00
2019-01-13 09:51:04 +01:00
2019-05-22 07:37:40 +02:00
2018-06-07 17:34:35 -07:00
2019-06-15 11:54:00 +02:00
2018-01-23 12:17:42 -06:00
2018-07-17 09:35:30 +02:00
2018-08-23 18:48:44 -07:00
2018-01-31 17:18:37 -08:00
2019-06-15 11:54:00 +02:00
2018-08-22 10:52:44 -07:00
2018-12-05 19:31:57 +01:00
2019-05-08 07:21:55 +02:00
2018-08-22 17:31:34 -07:00
2019-06-09 09:17:19 +02:00
2018-02-06 18:32:48 -08:00
2018-10-05 16:32:05 -07:00
2018-08-30 20:01:32 +02:00
2018-08-17 16:20:30 -07:00
2019-04-17 08:38:51 +02:00
2018-07-12 10:02:57 -04:00
2019-05-16 19:41:25 +02:00
2019-03-23 20:10:04 +01:00
2019-05-16 19:41:26 +02:00
2019-04-05 22:32:58 +02:00
2018-08-22 10:52:44 -07:00
2019-04-03 06:26:28 +02:00
2019-05-22 07:37:40 +02:00
2018-08-17 16:20:27 -07:00
2018-08-22 10:52:45 -07:00
2019-04-27 09:36:37 +02:00
2018-08-22 10:52:44 -07:00
2018-06-20 19:10:01 +02:00
2018-10-18 11:30:52 +02:00
2018-08-02 12:17:27 -06:00
2018-08-17 16:20:29 -07:00
2019-04-05 22:32:58 +02:00
2019-06-15 11:54:00 +02:00
2018-06-07 17:34:36 -07:00
2019-04-05 22:32:58 +02:00
2018-06-15 07:55:25 +09:00
2018-07-09 09:07:54 -06:00
2018-04-11 10:28:32 -07:00
2018-06-15 07:55:25 +09:00
2019-04-05 22:32:59 +02:00
2018-11-13 11:08:46 -08:00
2019-01-26 09:32:43 +01:00
2018-04-05 21:36:27 -07:00
2019-02-12 19:47:12 +01:00
2018-06-12 16:19:22 -07:00
2018-02-18 05:33:01 -08:00
2019-06-15 11:54:11 +02:00
2018-01-31 17:18:38 -08:00
2018-02-06 18:32:48 -08:00
2018-08-30 20:01:32 +02:00
2019-06-15 11:54:01 +02:00
2019-03-23 20:09:52 +01:00
2019-04-03 06:26:28 +02:00
2019-06-15 11:54:01 +02:00
2019-04-03 06:26:28 +02:00
2018-06-07 17:34:34 -07:00
2019-04-03 06:26:28 +02:00
2018-08-17 16:20:32 -07:00
2019-04-05 22:32:58 +02:00
2018-08-22 10:52:44 -07:00
2018-06-12 16:19:22 -07:00
2019-03-23 20:09:50 +01:00
2019-04-05 22:32:58 +02:00
2018-12-05 19:32:13 +01:00
2019-01-16 22:04:33 +01:00
2019-05-22 07:37:40 +02:00
2019-01-16 22:04:36 +01:00
2018-09-13 15:18:04 -10:00
2019-04-05 22:32:58 +02:00
2018-06-07 17:34:36 -07:00
2019-05-16 19:41:23 +02:00
2019-04-27 09:36:40 +02:00
2018-08-17 16:20:32 -07:00
2018-12-01 09:37:33 +01:00
2018-02-06 18:32:48 -08:00
2018-02-21 15:35:43 -08:00
2018-08-17 16:20:30 -07:00
2018-07-26 19:38:03 -07:00