Commit 917257d
committed
io_uring: only test SQPOLL cpu after we've verified it
We currently call cpu_possible() even if we don't use the CPU. Move the
test under the SQ_AFF branch, which is the only place where we'll use
the value. Do the cpu_possible() test AFTER we've limited it to a max
of NR_CPUS. This avoids triggering the following warning:
WARNING: CPU: 1 PID: 7600 at include/linux/cpumask.h:121 cpu_max_bits_warn
if CONFIG_DEBUG_PER_CPU_MAPS is enabled.
While in there, also move the SQ thread idle period assignment inside
SETUP_SQPOLL, as we don't use it otherwise either.
Reported-by: syzbot+cd714a07c6de2bc34293@syzkaller.appspotmail.com
Fixes: 6c271ce ("io_uring: add submission polling")
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent 0605863 commit 917257d
1 file changed
+8
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2241 | 2241 | | |
2242 | 2242 | | |
2243 | 2243 | | |
2244 | | - | |
2245 | | - | |
2246 | | - | |
2247 | | - | |
2248 | 2244 | | |
2249 | 2245 | | |
2250 | 2246 | | |
| |||
2254 | 2250 | | |
2255 | 2251 | | |
2256 | 2252 | | |
| 2253 | + | |
| 2254 | + | |
| 2255 | + | |
| 2256 | + | |
2257 | 2257 | | |
2258 | 2258 | | |
2259 | 2259 | | |
2260 | 2260 | | |
| 2261 | + | |
| 2262 | + | |
| 2263 | + | |
| 2264 | + | |
2261 | 2265 | | |
2262 | 2266 | | |
2263 | 2267 | | |
| |||
0 commit comments