Re: [PATCH v4] usb: gadget: uvc: fix NULL pointer dereference during unbind race
From: Jimmy Hu (xWF)
Date: Mon Apr 06 2026 - 22:26:13 EST
Hi Roshan,
Thank you very much for the detailed testing and the positive feedback!
It’s great to hear that the patch resolved the NULL pointer
dereference on the Xilinx ZynqMP platform, especially under the
SIGKILL stress tests. This confirms the robustness of the
synchronization logic across different environments.
For your information, Greg KH has already accepted this patch into the
usb-linus branch, and it should be headed to the mainline and stable
trees shortly.
I really appreciate the time you took to verify this fix.
Best regards,
Jimmy
On Thu, Apr 2, 2026 at 8:29 PM Roshan Binu Paul
<roshan.binu@xxxxxxxxxxxxx> wrote:
>
> 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