usb: gadget: NCM: Protect dev->port_usb using dev->lock
authorHarish Jenny K N <harish_kandiga@mentor.com>
Fri, 9 Sep 2016 09:30:42 +0000 (11:30 +0200)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Fri, 9 Sep 2016 11:49:20 +0000 (14:49 +0300)
commitc9ffc78745f89e300fe704348dd8e6800acf4d18
treee70891db457aa3c4d4ce882e1d612c20d89def65
parent79775f441838403be856e06eaab893a3fe9dd7b2
usb: gadget: NCM: Protect dev->port_usb using dev->lock

This commit incorporates findings from
https://lkml.org/lkml/2016/4/25/594

The function has been modified to make sure we hold
the dev lock when accessing the net device pointer.

Acked-by: Jim Baxter <jim_baxter@mentor.com>
Signed-off-by: Harish Jenny K N <harish_kandiga@mentor.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/gadget/function/u_ether.c