Commit e4777dcd authored by Carlos Llamas's avatar Carlos Llamas Committed by Treehugger Robot
Browse files

Revert "usb: gadget: f_ncm: Always set current gadget in ncm_bind()"



This reverts commit d2500cd6.

The intention of such commit is to allow new gadget bindings with the
net device beyond the initial attempt. However, these new bindings are
only done _partially_ as the register_netdev() step is skipped, which
messes up the gadget reference count.

During tear-down the gadget is released leaving the net device with a
dev->parent dangling pointer. A subsequent netlink dump operation
attempts to access the parents info but triggering a use-after-free.

Remove this commit while a better/permanent fix is discussed upstream.

Bug: 421120878
Cc: Neill Kapron <nkapron@google.com>
Cc: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I4f000087ca82087dd2282301e57cb7330f651366
Signed-off-by: default avatarCarlos Llamas <cmllamas@google.com>
parent 7a0208b6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment