Skip to content

Commit

Permalink
ibmvnic: Free RX socket buffer in case of adapter error
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Thomas Falcon authored and David S. Miller committed Feb 14, 2018
1 parent 6e4842d commit 4b9b0f0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/ethernet/ibm/ibmvnic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1869,6 +1869,7 @@ static int ibmvnic_poll(struct napi_struct *napi, int budget)
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;
}
Expand Down

0 comments on commit 4b9b0f0

Please sign in to comment.