Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LF-12723 mxc IPUv3: device: Set ipu_task_thread affinity properly
The ipu_task_thread thread ran by kthread_run() could be excuted before kthread_run() returns especially when 'nosmp' or 'maxcpus=1' kernel bootup parameters are used. So, in this case, the thread[0] or thread[1] entries in struct ipu_soc are not yet set before ipu_task_thread() references them to set thread affinity, hence a NULL pointer de-referencing issue happens. Fix this by referencing *current* task in ipu_task_thread() instead of the uninitialized thread[0] or thread[1] entries. This fixes an old bug introduced by the below commit in linux-imx: commit 0d36f8226d22 ("ENGR00175724-2 IPU: change ipu_device thread process mode to interrupt mode.") Signed-off-by: Liu Ying <[email protected]> Reviewed-by: Sandor Yu <[email protected]> Acked-by: Jason Liu <[email protected]>
- Loading branch information