linux-imx/drivers/mxc/ipu3
Liu Ying d4c4988333 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 <victor.liu@nxp.com>
Reviewed-by: Sandor Yu <Sandor.yu@nxp.com>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>
2024-11-11 14:12:41 +08:00
..
ipu_calc_stripes_sizes.c
ipu_capture.c
ipu_common.c LF-9723 mxc: ipu3: ipu_common: Check source channel id against {proc,disp}_src_sel array sizes 2023-10-30 15:56:27 +08:00
ipu_device.c LF-12723 mxc IPUv3: device: Set ipu_task_thread affinity properly 2024-11-11 14:12:41 +08:00
ipu_disp.c
ipu_ic.c
ipu_param_mem.h
ipu_pixel_clk.c LF-9705 mxc: ipu3: ipu_pixel_clk: Replace kzalloc() with devm_kzalloc() 2023-10-30 15:56:27 +08:00
ipu_prv.h
ipu_regs.h
Kconfig
Makefile
pre-regs.h
pre.c
prg-regs.h
prg.c LF-9707 mxc: ipu3: prg: Check return value of regmap_field_read() 2023-10-30 15:56:27 +08:00
vdoa.c
vdoa.h