Re: [PATCH v4] usb: gadget: uvc: fix NULL pointer dereference during unbind race
From: Roshan Binu Paul
Date: Thu Apr 02 2026 - 08:32:30 EST
Hi Jimmy,
I have tested this patch on a Xilinx ZynqMP platform running a custom
UVC video streaming application.
Test Environment
----------------
Platform : Xilinx ZynqMP
Kernel : 6.6.40-xilinx-g7c7280e64b31
Application : Custom UVC video streaming application
Base : PetaLinux 2024.2
Verification
------------
Confirmed patch is applied by checking for uvc_vdev_release symbol
in /proc/kallsyms.
Test Methodology
----------------
1. Start UVC video streaming application
2. Send SIGKILL to force terminate the application
3. Wait for application auto-restart
4. Check kernel messages for NULL pointer dereference or panic
5. Repeat for 10 cycles
Test Results
------------
SIGKILL stress test : 10/10 cycles (3 Reps) PASSED
NULL pointer crashes: None observed
Kernel panics : None observed
System stability : Stable throughout testing
Prior to this patch, we observed NULL pointer dereferences in
usb_gadget_deactivate() when applications were force-killed during
active streaming sessions. This patch resolves that issue.
Tested-by: Roshan Binu Paul <roshan.binu@xxxxxxxxxxxxx>
Thanks for the fix.
Best regards,
Roshan Binu Paul
DicorTech