mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 07:03:09 -04:00
usb: u_ether: Add null pointer check for sk_buff in eth_start_xmit
There is a possibility of null pointer dereference for sk_buff in the function eth_start_xmit. Fix this by removing sk_buff from if check at the start of the function eth_start_xmit so that if sk_buff is null dev_kfree_skb_any will return without proceeding further. Change-Id: I105e42c59aaa83c8d74cc5a9e894ae4fc87c3c9f Signed-off-by: Rohith Kollalsi <rkollals@codeaurora.org>
This commit is contained in:
parent
0e2097ce85
commit
a215b92aa2
1 changed files with 1 additions and 1 deletions
|
|
@ -490,7 +490,7 @@ static netdev_tx_t eth_start_xmit(struct sk_buff *skb,
|
|||
}
|
||||
spin_unlock_irqrestore(&dev->lock, flags);
|
||||
|
||||
if (skb && !in) {
|
||||
if (!in) {
|
||||
dev_kfree_skb_any(skb);
|
||||
return NETDEV_TX_OK;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue