Linux kernel staging patches
 help / color / mirror / Atom feed
* [PATCH v2 0/2] staging: vchiq_core: Stop kthreads on module unload
@ 2024-07-03 13:10 Umang Jain
  2024-07-03 13:10 ` [PATCH v2 1/2] staging: vchiq_core: Bubble up wait_event_interruptible() return value Umang Jain
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Umang Jain @ 2024-07-03 13:10 UTC (permalink / raw)
  To: linux-staging
  Cc: Dan Carpenter, Kieran Bingham, Laurent Pinchart, Dave Stevenson,
	Phil Elwell, Greg Kroah-Hartman, Stefan Wahren, Umang Jain

This is a re-attempt of [1] where we noticed corruption of vc04 firmware
on stopping the kthread.

After investigation, I found that the case where
wait_event_interruptible() can return early(wait failed) with
-ERESTARTSYS, is something not handling in remote_event_wait(). Once we
bubble up the that return/err code and handle it - the issue is resolved
correctly and kthreads are stopped as expected.

Patch 1/2 handles the returning of the return value from
wait_event_interruptible()

Patch 2/2 handles stopping of kthreads.

---
Testing with
+CONFIG_BCM_VIDEOCORE=y
+CONFIG_BCM2835_VCHIQ=m
+CONFIG_VCHIQ_CDEV=y
+CONFIG_BCM2835_VCHIQ_MMAL=m
+CONFIG_VIDEO_BCM2835=m

and as per
drivers/staging/vc04_services/interface/TESTING

Entire test sequence:
https://paste.debian.net/plain/1322185
---

[1]: https://lore.kernel.org/linux-staging/20240403052100.2794-1-umang.jain@ideasonboard.com/ 

Changes in v2:
- Return 0 as success value for remote_wait_event() in 1/2
- Fix stopping of 'keep-alive' kthread in 2/2. 

Umang Jain (2):
  staging: vchiq_core: Bubble up wait_event_interruptible() return value
  staging: vc04_services: vchiq_core: Stop kthreads on vchiq module
    unload

 drivers/staging/vc04_services/interface/TODO  |  7 ----
 .../interface/vchiq_arm/vchiq_arm.c           | 10 ++++-
 .../interface/vchiq_arm/vchiq_core.c          | 37 ++++++++++++++-----
 3 files changed, 36 insertions(+), 18 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-07-06  8:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-03 13:10 [PATCH v2 0/2] staging: vchiq_core: Stop kthreads on module unload Umang Jain
2024-07-03 13:10 ` [PATCH v2 1/2] staging: vchiq_core: Bubble up wait_event_interruptible() return value Umang Jain
2024-07-03 16:18   ` Stefan Wahren
2024-07-03 16:54     ` Dan Carpenter
2024-07-03 13:10 ` [PATCH v2 2/2] staging: vc04_services: vchiq_core: Stop kthreads on vchiq module unload Umang Jain
2024-07-03 16:31   ` Stefan Wahren
2024-07-03 16:44     ` Umang Jain
2024-07-06  8:50 ` [PATCH v2 0/2] staging: vchiq_core: Stop kthreads on " Stefan Wahren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox