block: Disable preemption during IPI consideration
The function `__blk_complete_request` attempts to acquire the current CPU. It determines where the demanding request should be processed. In doing so, it checks if the current CPU and the previously requested CPU share the same cache, and if so, to place the request on the local CPU. The issue with acquiring the current CPU with using `smp_processor_id` is that the current task might be preempted mid-request completion. This will either delay block requests from being executed, or fail to execute entirely. Use `get_cpu` and `put_cpu` to prevent this oops from occurring. See `blk-mq.c` for more details. Signed-off-by:Tyler Nijmeh <tylernij@gmail.com> Signed-off-by:
Pranav Vashi <neobuddy89@gmail.com>
Loading
Please register or sign in to comment