Re: [PATCH] USB: gadget: fix NULL pointer dereference in gadget_dev_ioctl()

From: Lovekesh Solanki

Date: Tue Aug 25 2026 - 13:17:53 EST


On Tue, Aug 25, 2026 at 11:40:21AM -0400, Alan Stern wrote:
> But those facts would remain true even if gadgetfs_bind() were to write
> dev->gadget while holding the lock, wouldn't they? So the fact that the
> lock isn't held during the write makes no difference to your patch.
I understand now, I've dropped these irrelavant parts from the commit
message and removed the NULL check in v2.

Here is the link to v2:
https://lore.kernel.org/all/20260825171343.459630-1-lovekeshsolanki00@xxxxxxxxx/T/#u

Regards,
Lovekesh