diff options
author | Ivan Safonov <insafonov@gmail.com> | 2017-01-04 17:22:17 +0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-01-05 18:50:05 +0100 |
commit | 64cd405ac9b94e99ce5544fbc156690ae867ae3a (patch) | |
tree | eac2d86077f5ce411852dabe8aac6466ee67de0d /drivers/staging/rtl8188eu/os_dep | |
parent | 80c96e08c416b477d8338e5ddc40f47a94068fe0 (diff) | |
download | op-kernel-dev-64cd405ac9b94e99ce5544fbc156690ae867ae3a.zip op-kernel-dev-64cd405ac9b94e99ce5544fbc156690ae867ae3a.tar.gz |
staging:r8188eu: eleminate recovery attemp using skb_clone after netdev_alloc_skb fail
It is wrong to create new skb using skb_clone instead netdev_alloc_skb,
because buffer data will be changed later.
Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8188eu/os_dep')
-rw-r--r-- | drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c b/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c index e2dbe1b..5f6cbe0 100644 --- a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c +++ b/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c @@ -133,22 +133,9 @@ static int recvbuf2recvframe(struct adapter *adapt, struct sk_buff *pskb) precvframe->rx_tail = pkt_copy->data; precvframe->rx_data = pkt_copy->data; } else { - if ((pattrib->mfrag == 1) && (pattrib->frag_num == 0)) { - DBG_88E("recvbuf2recvframe: alloc_skb fail , drop frag frame\n"); - rtw_free_recvframe(precvframe, pfree_recv_queue); - goto _exit_recvbuf2recvframe; - } - precvframe->pkt = skb_clone(pskb, GFP_ATOMIC); - if (precvframe->pkt) { - precvframe->rx_tail = pbuf + pattrib->drvinfo_sz + RXDESC_SIZE; - precvframe->rx_head = precvframe->rx_tail; - precvframe->rx_data = precvframe->rx_tail; - precvframe->rx_end = pbuf + pattrib->drvinfo_sz + RXDESC_SIZE + alloc_sz; - } else { - DBG_88E("recvbuf2recvframe: skb_clone fail\n"); - rtw_free_recvframe(precvframe, pfree_recv_queue); - goto _exit_recvbuf2recvframe; - } + DBG_88E("recvbuf2recvframe: alloc_skb fail , drop frag frame\n"); + rtw_free_recvframe(precvframe, pfree_recv_queue); + goto _exit_recvbuf2recvframe; } recvframe_put(precvframe, skb_len); |