Message ID | 20241211114905.368044-1-stanislaw.gruszka@linux.intel.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [v2] media: intel/ipu6: remove cpu latency qos request on error | expand |
Hi, On 11-Dec-24 12:49 PM, Stanislaw Gruszka wrote: > Fix cpu latency qos list corruption like below. It happens when > we do not remove cpu latency request on error path and free > corresponding memory. > > [ 30.634378] l7 kernel: list_add corruption. prev->next should be next (ffffffff9645e960), but was 0000000100100001. (prev=ffff8e9e877e20a8). > [ 30.634388] l7 kernel: WARNING: CPU: 2 PID: 2008 at lib/list_debug.c:32 __list_add_valid_or_report+0x83/0xa0 > <snip> > [ 30.634640] l7 kernel: Call Trace: > [ 30.634650] l7 kernel: <TASK> > [ 30.634659] l7 kernel: ? __list_add_valid_or_report+0x83/0xa0 > [ 30.634669] l7 kernel: ? __warn.cold+0x93/0xf6 > [ 30.634678] l7 kernel: ? __list_add_valid_or_report+0x83/0xa0 > [ 30.634690] l7 kernel: ? report_bug+0xff/0x140 > [ 30.634702] l7 kernel: ? handle_bug+0x58/0x90 > [ 30.634712] l7 kernel: ? exc_invalid_op+0x17/0x70 > [ 30.634723] l7 kernel: ? asm_exc_invalid_op+0x1a/0x20 > [ 30.634733] l7 kernel: ? __list_add_valid_or_report+0x83/0xa0 > [ 30.634742] l7 kernel: plist_add+0xdd/0x140 > [ 30.634754] l7 kernel: pm_qos_update_target+0xa0/0x1f0 > [ 30.634764] l7 kernel: cpu_latency_qos_update_request+0x61/0xc0 > [ 30.634773] l7 kernel: intel_dp_aux_xfer+0x4c7/0x6e0 [i915 1f824655ed04687c2b0d23dbce759fa785f6d033] > > Reported-by: Genes Lists <lists@sapience.com> > Closes: https://lore.kernel.org/linux-media/c0e94be466b367f1a3cfdc3cb7b1a4f47e5953ae.camel@sapience.com/ > Fixes: f50c4ca0a820 ("media: intel/ipu6: add the main input system driver") > Cc: stable@vger.kernel.org > Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com> > --- > v2: add Closes tag Thanks, patch looks good to me: Reviewed-by: Hans de Goede <hdegoede@redhat.com> Regards, Hans > > drivers/media/pci/intel/ipu6/ipu6-isys.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/media/pci/intel/ipu6/ipu6-isys.c b/drivers/media/pci/intel/ipu6/ipu6-isys.c > index 77f9c7319868..8df1d83a74b5 100644 > --- a/drivers/media/pci/intel/ipu6/ipu6-isys.c > +++ b/drivers/media/pci/intel/ipu6/ipu6-isys.c > @@ -1133,6 +1133,7 @@ static int isys_probe(struct auxiliary_device *auxdev, > free_fw_msg_bufs: > free_fw_msg_bufs(isys); > out_remove_pkg_dir_shared_buffer: > + cpu_latency_qos_remove_request(&isys->pm_qos); > if (!isp->secure_mode) > ipu6_cpd_free_pkg_dir(adev); > remove_shared_buffer:
diff --git a/drivers/media/pci/intel/ipu6/ipu6-isys.c b/drivers/media/pci/intel/ipu6/ipu6-isys.c index 77f9c7319868..8df1d83a74b5 100644 --- a/drivers/media/pci/intel/ipu6/ipu6-isys.c +++ b/drivers/media/pci/intel/ipu6/ipu6-isys.c @@ -1133,6 +1133,7 @@ static int isys_probe(struct auxiliary_device *auxdev, free_fw_msg_bufs: free_fw_msg_bufs(isys); out_remove_pkg_dir_shared_buffer: + cpu_latency_qos_remove_request(&isys->pm_qos); if (!isp->secure_mode) ipu6_cpd_free_pkg_dir(adev); remove_shared_buffer:
Fix cpu latency qos list corruption like below. It happens when we do not remove cpu latency request on error path and free corresponding memory. [ 30.634378] l7 kernel: list_add corruption. prev->next should be next (ffffffff9645e960), but was 0000000100100001. (prev=ffff8e9e877e20a8). [ 30.634388] l7 kernel: WARNING: CPU: 2 PID: 2008 at lib/list_debug.c:32 __list_add_valid_or_report+0x83/0xa0 <snip> [ 30.634640] l7 kernel: Call Trace: [ 30.634650] l7 kernel: <TASK> [ 30.634659] l7 kernel: ? __list_add_valid_or_report+0x83/0xa0 [ 30.634669] l7 kernel: ? __warn.cold+0x93/0xf6 [ 30.634678] l7 kernel: ? __list_add_valid_or_report+0x83/0xa0 [ 30.634690] l7 kernel: ? report_bug+0xff/0x140 [ 30.634702] l7 kernel: ? handle_bug+0x58/0x90 [ 30.634712] l7 kernel: ? exc_invalid_op+0x17/0x70 [ 30.634723] l7 kernel: ? asm_exc_invalid_op+0x1a/0x20 [ 30.634733] l7 kernel: ? __list_add_valid_or_report+0x83/0xa0 [ 30.634742] l7 kernel: plist_add+0xdd/0x140 [ 30.634754] l7 kernel: pm_qos_update_target+0xa0/0x1f0 [ 30.634764] l7 kernel: cpu_latency_qos_update_request+0x61/0xc0 [ 30.634773] l7 kernel: intel_dp_aux_xfer+0x4c7/0x6e0 [i915 1f824655ed04687c2b0d23dbce759fa785f6d033] Reported-by: Genes Lists <lists@sapience.com> Closes: https://lore.kernel.org/linux-media/c0e94be466b367f1a3cfdc3cb7b1a4f47e5953ae.camel@sapience.com/ Fixes: f50c4ca0a820 ("media: intel/ipu6: add the main input system driver") Cc: stable@vger.kernel.org Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com> --- v2: add Closes tag drivers/media/pci/intel/ipu6/ipu6-isys.c | 1 + 1 file changed, 1 insertion(+)