diff mbox

[net] RDMA/nes: don't leak skb if carrier down

Message ID 1461529139-28582-1-git-send-email-fw@strlen.de
State Not Applicable, archived
Delegated to: David Miller
Headers show

Commit Message

Florian Westphal April 24, 2016, 8:18 p.m. UTC
Alternatively one could free the skb, OTOH I don't think this test is
useful so just remove it.

Cc: <linux-rdma@vger.kernel.org>
Signed-off-by: Florian Westphal <fw@strlen.de>
---
 Noticed this while working on the TX_LOCKED removal.

Comments

David Miller April 28, 2016, 6:20 p.m. UTC | #1
From: Florian Westphal <fw@strlen.de>
Date: Sun, 24 Apr 2016 22:18:59 +0200

> Alternatively one could free the skb, OTOH I don't think this test is
> useful so just remove it.
> 
> Cc: <linux-rdma@vger.kernel.org>
> Signed-off-by: Florian Westphal <fw@strlen.de>
> ---
>  Noticed this while working on the TX_LOCKED removal.

Assuming Doug will take this.
Doug Ledford April 28, 2016, 11:14 p.m. UTC | #2
On 4/28/2016 2:20 PM, David Miller wrote:
> From: Florian Westphal <fw@strlen.de>
> Date: Sun, 24 Apr 2016 22:18:59 +0200
> 
>> Alternatively one could free the skb, OTOH I don't think this test is
>> useful so just remove it.
>>
>> Cc: <linux-rdma@vger.kernel.org>
>> Signed-off-by: Florian Westphal <fw@strlen.de>
>> ---
>>  Noticed this while working on the TX_LOCKED removal.
> 
> Assuming Doug will take this.

Thanks for mentioning this ;-)

They had sent to netdev and cc:ed linux-rdma, so I took that to mean
they intended for you to take it.  I'll pick it up for my upcoming pull
request.
diff mbox

Patch

diff --git a/drivers/infiniband/hw/nes/nes_nic.c b/drivers/infiniband/hw/nes/nes_nic.c
index 3ea9e05..9291453 100644
--- a/drivers/infiniband/hw/nes/nes_nic.c
+++ b/drivers/infiniband/hw/nes/nes_nic.c
@@ -500,9 +500,6 @@  static int nes_netdev_start_xmit(struct sk_buff *skb, struct net_device *netdev)
 	 *		skb_shinfo(skb)->nr_frags, skb_is_gso(skb));
 	 */
 
-	if (!netif_carrier_ok(netdev))
-		return NETDEV_TX_OK;
-
 	if (netif_queue_stopped(netdev))
 		return NETDEV_TX_BUSY;