Re: [PATCH v3 1/2] usbip: usbip_host: fix null pointer dereference in rebind_store
From: Jeffin Philip
Date: Mon Aug 31 2026 - 06:36:46 EST
On Mon, 31 Aug 2026 12:04:45 +0200, Greg KH wrote:
>No one will ever notice this, just remove the sysfs file entirely if
>you really think it is ok to remove the functionality. That way
>userspace will notice and handle it properly (hopefully...)
userspace tool atp handles this properly as it unbinds and rebinds sequentially.
The problem is when any script tries to do this without a particular order in
sysfs: bind, rebind then unbind causes an invalid opcode and attempting to directly
rebind immediately after writing to match_busid causes the dereference. I think
it is best we drop the rebind_store function and use drivers_probe(). We add
del_match_busid() alone to rebind_store() to stop tracking.
>But, are you sure it is ok to remove this user/kernel api? What about
>workflows that are using it?
Any scripts/user that don't use the sysfs properly can keep the broken pieces
themselves, no? We have the newer drivers_probe() that can perform this
much more cleaner.
Ultimately we can keep the rebind_store() function if you choose. But this is just
my opinion.
Thanks,
Jeffin.