Browse files

staging: hv: fix counting of available buffer slots when send fails

Because the number of available buffer slots doesn't decrease for failed
sends, we should not call netvsc_xmit_completion(), which increase the
count of available slots. In this failed case, just free the memory is

Signed-off-by: Haiyang Zhang <>
Signed-off-by: K. Y. Srinivasan <>
Signed-off-by: Greg Kroah-Hartman <>
  • Loading branch information...
1 parent 7db1d94 commit 8a5f9edc4dd6c1f9fb2446a36e7cd44b79412271 @haiyangz haiyangz committed with gregkh Sep 1, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 drivers/staging/hv/netvsc_drv.c
@@ -190,7 +190,8 @@ static int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net)
} else {
/* we are shutting down or bus overloaded, just drop packet */
- netvsc_xmit_completion(packet);
+ kfree(packet);
+ dev_kfree_skb_any(skb);
return NETDEV_TX_OK;

0 comments on commit 8a5f9ed

Please sign in to comment.