mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 05:39:54 -04:00
moto_f_usbnet:Release skb if bulk_in is NULL
Ip link tearing down is later than the usbnet disabling. Kernel will panic if bulk_in endpoint is NULL and ip stack still has data Free the skb in this case. Change-Id: Icc987551da4a8b9c1998b0c09f19fbed49ea58ee Signed-off-by: a17671 <a17671@motorola.com> Reviewed-on: https://gerrit.mot.com/1220589 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Igor Kovalenko <igork@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
9e945d5c93
commit
f3cbb755a7
1 changed files with 10 additions and 0 deletions
|
|
@ -349,6 +349,16 @@ static int usb_ether_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||
unsigned len;
|
||||
int rc;
|
||||
|
||||
/*usbnet might be disabled before ip link down
|
||||
* free the skb in this case
|
||||
*/
|
||||
if (NULL == context->bulk_in) {
|
||||
dev_kfree_skb_any(skb);
|
||||
USBNETDBG(context,
|
||||
"%s:bulk_in end point is disabled\n", __func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
req = usb_get_xmit_request(STOP_QUEUE, dev);
|
||||
|
||||
if (!req) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue