Skip to content

media: wave5: Fix critical issues in driver remove path

Xulin Sun linux-media lkml 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 0 repliesNew
  2. v13 patches 1 replySuperseded

Changes in v2 from the cover letter

- Reformatted commit messages per maintainer feedback
* Removed "Symptom:/Root cause:/Fix:" section titles
* Reordered content: fix description → root cause → symptoms
* Added Fixes: tags for backport tracking
- Retested on media/master (6.18-rc5)
* All three issues still exist in the code logic
* Issues are harder to trigger on 6.18-rc5
* Applied patches resolve all issues on both 6.12.58-rt6 and 6.18-rc5

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3media: wave5: Fix PM runtime usage count underflowdrivers/media/platform/chips-media/wave5/wave5-vpu.c+1 -10 replies
2/3media: wave5: Fix kthread worker destruction in polling modedrivers/media/platform/chips-media/wave5/wave5-vpu.c+2 -10 replies
3/3media: wave5: Fix device cleanup order to prevent kernel panicdrivers/media/platform/chips-media/wave5/wave5-vpu.c+4 -30 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchNicolas Dufresne
1/3R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/3] media: wave5: Fix critical issues in driver remove path

This patch series fixes three critical issues in the wave5 VPU driver's remove path that cause kernel warnings and system crashes.

The issues were discovered and consistently reproduced on kernel 6.12.58-rt6 with the TI AM62A platform during extensive testing with gstreamer encoding pipelines and module load/unload cycles.

v1: https://lore.kernel.org/linux-media/[email protected]

Changes in v2:
- Reformatted commit messages per maintainer feedback
* Removed "Symptom:/Root cause:/Fix:" section titles
* Reordered content: fix description → root cause → symptoms
* Added Fixes: tags for backport tracking
- Retested on media/master (6.18-rc5)
* All three issues still exist in the code logic
* Issues are harder to trigger on 6.18-rc5
* Applied patches resolve all issues on both 6.12.58-rt6 and 6.18-rc5

Patch 1: Fixes PM runtime reference count underflow Patch 2: Fixes kthread worker destruction warning Patch 3: Fixes kernel panic due to incorrect cleanup order

Testing performed:
- 50+ consecutive H.264/H.265 encoding operations
- 100+ modprobe/rmmod cycles
- Tested on both 6.12.58-rt6 (TI AM62A) and 6.18-rc5
- No warnings or crashes observed after applying patches

Xulin Sun (3):
media: wave5: Fix PM runtime usage count underflow
media: wave5: Fix kthread worker destruction in polling mode
media: wave5: Fix device cleanup order to prevent kernel panic

 drivers/media/platform/chips-media/wave5/wave5-vpu.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
Signature · 1 line
2.49.1