Commit cbd5021
random: use offstack cpumask when necessary
[ Upstream commit 5d49f1a ]
The entropy generation function keeps a local cpu mask on the stack,
which can trigger warnings in configurations with a large number of
CPUs:
drivers/char/random.c:1292:20: error: stack frame size (1288)
exceeds limit (1280) in 'try_to_generate_entropy' [-Werror,-Wframe-larger-than]
Use the cpumask interface to dynamically allocate it in those
configurations.
Fixes: 1c21fe0 ("random: spread out jitter callback to different CPUs")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>1 parent 8ddff99 commit cbd5021
1 file changed
+12
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1296 | 1296 | | |
1297 | 1297 | | |
1298 | 1298 | | |
| 1299 | + | |
1299 | 1300 | | |
1300 | 1301 | | |
1301 | 1302 | | |
| |||
1310 | 1311 | | |
1311 | 1312 | | |
1312 | 1313 | | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
1313 | 1317 | | |
1314 | 1318 | | |
1315 | 1319 | | |
1316 | 1320 | | |
1317 | 1321 | | |
1318 | 1322 | | |
1319 | | - | |
1320 | 1323 | | |
1321 | 1324 | | |
1322 | 1325 | | |
| |||
1326 | 1329 | | |
1327 | 1330 | | |
1328 | 1331 | | |
1329 | | - | |
1330 | | - | |
| 1332 | + | |
| 1333 | + | |
1331 | 1334 | | |
1332 | 1335 | | |
1333 | | - | |
1334 | | - | |
| 1336 | + | |
| 1337 | + | |
1335 | 1338 | | |
1336 | 1339 | | |
1337 | 1340 | | |
1338 | 1341 | | |
1339 | | - | |
| 1342 | + | |
1340 | 1343 | | |
1341 | | - | |
| 1344 | + | |
1342 | 1345 | | |
1343 | 1346 | | |
1344 | 1347 | | |
| |||
1354 | 1357 | | |
1355 | 1358 | | |
1356 | 1359 | | |
| 1360 | + | |
| 1361 | + | |
1357 | 1362 | | |
1358 | 1363 | | |
1359 | 1364 | | |
| |||
0 commit comments