ibmvnic: Free RX socket buffer in case of adapter error
authorThomas Falcon <tlfalcon@linux.vnet.ibm.com>
Wed, 14 Feb 2018 00:23:42 +0000 (18:23 -0600)
committerDavid S. Miller <davem@davemloft.net>
Wed, 14 Feb 2018 19:39:10 +0000 (14:39 -0500)
If a RX buffer is returned to the client driver with an error, free the
corresponding socket buffer before continuing.

Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ibm/ibmvnic.c

index 23e0b42..bc93fa2 100644 (file)
@@ -1869,6 +1869,7 @@ restart_poll:
                                   be16_to_cpu(next->rx_comp.rc));
                        /* free the entry */
                        next->rx_comp.first = 0;
+                       dev_kfree_skb_any(rx_buff->skb);
                        remove_buff_from_pool(adapter, rx_buff);
                        continue;
                }