summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorKuen-Han Tsai <khtsai@google.com>2026-02-21 22:48:15 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-02-23 20:22:29 +0100
commitfde0634ad9856b3943a2d1a8cc8de174a63ac840 (patch)
treec2fb6e3150e57b20e3231546d87608ce69b81eaa /include/linux
parentb9fde507355342a2d64225d582dc8b98ff5ecb19 (diff)
usb: legacy: ncm: Fix NPE in gncm_bind
Commit 56a512a9b410 ("usb: gadget: f_ncm: align net_device lifecycle with bind/unbind") deferred the allocation of the net_device. This change leads to a NULL pointer dereference in the legacy NCM driver as it attempts to access the net_device before it's fully instantiated. Store the provided qmult, host_addr, and dev_addr into the struct ncm_opts->net_opts during gncm_bind(). These values will be properly applied to the net_device when it is allocated and configured later in the binding process by the NCM function driver. Fixes: 56a512a9b410 ("usb: gadget: f_ncm: align net_device lifecycle with bind/unbind") Cc: stable@kernel.org Reported-by: kernel test robot <oliver.sang@intel.com> Closes: https://lore.kernel.org/oe-lkp/202602181727.fd76c561-lkp@intel.com Signed-off-by: Kuen-Han Tsai <khtsai@google.com> Link: https://patch.msgid.link/20260221-legacy-ncm-v2-1-dfb891d76507@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions