summaryrefslogtreecommitdiff
path: root/rust/kernel
diff options
context:
space:
mode:
authorKuen-Han Tsai <khtsai@google.com>2026-03-09 20:04:49 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-03-11 16:21:11 +0100
commit46662d3a1ad40282ba9f753cccc6f909ec4468cc (patch)
tree53b495ab2327c56cf9c213e6303e47eaed39ee7f /rust/kernel
parent37893bc5de2460c543ec1aa8250c37a305234054 (diff)
Revert "usb: gadget: u_ether: Add auto-cleanup helper for freeing net_device"
This reverts commit 0c0981126b99288ed354d3d414c8a5fd42ac9e25. This commit is being reverted as part of a series-wide revert. By deferring the net_device allocation to the bind() phase, a single function instance will spawn multiple network devices if it is symlinked to multiple USB configurations. This causes regressions for userspace tools (like the postmarketOS DHCP daemon) that rely on reading the interface name (e.g., "usb0") from configfs. Currently, configfs returns the template "usb%d", causing the userspace network setup to fail. Crucially, because this patch breaks the 1:1 mapping between the function instance and the network device, this naming issue cannot simply be patched. Configfs only exposes a single 'ifname' attribute per instance, making it impossible to accurately report the actual interface name when multiple underlying network devices can exist for that single instance. All configurations tied to the same function instance are meant to share a single network device. Revert this change to restore the 1:1 mapping by allocating the network device at the instance level (alloc_inst). Reported-by: David Heidelberg <david@ixit.cz> Closes: https://lore.kernel.org/linux-usb/70b558ea-a12e-4170-9b8e-c951131249af@ixit.cz/ Fixes: 56a512a9b410 ("usb: gadget: f_ncm: align net_device lifecycle with bind/unbind") Cc: stable <stable@kernel.org> Signed-off-by: Kuen-Han Tsai <khtsai@google.com> Link: https://patch.msgid.link/20260309-f-ncm-revert-v2-4-ea2afbc7d9b2@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'rust/kernel')
0 files changed, 0 insertions, 0 deletions