lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 14 Mar 2014 20:19:38 +0000
From:	"Tantilov, Emil S" <emil.s.tantilov@...el.com>
To:	David Miller <davem@...emloft.net>,
	"Kirsher, Jeffrey T" <jeffrey.t.kirsher@...el.com>
CC:	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"gospo@...hat.com" <gospo@...hat.com>,
	"sassmann@...hat.com" <sassmann@...hat.com>,
	"asharma@...com" <asharma@...com>,
	"stable@...r.kernel.org" <stable@...r.kernel.org>
Subject: RE: [net-next 01/16] ixgbe: add check for netif_carrier_ok in
 ixgbe_xmit_frame

>-----Original Message-----
>From: David Miller [mailto:davem@...emloft.net]
>Sent: Friday, March 14, 2014 11:58 AM
>To: Kirsher, Jeffrey T
>Cc: Tantilov, Emil S; netdev@...r.kernel.org;
>gospo@...hat.com; sassmann@...hat.com; asharma@...com;
>stable@...r.kernel.org
>Subject: Re: [net-next 01/16] ixgbe: add check for
>netif_carrier_ok in ixgbe_xmit_frame
>
>From: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
>Date: Fri, 14 Mar 2014 02:47:11 -0700
>
>> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
>b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
>> index 851c413..8bea6ca 100644
>> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
>> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
>> @@ -7121,6 +7121,11 @@ static netdev_tx_t
>__ixgbe_xmit_frame(struct sk_buff *skb,
>>  	struct ixgbe_adapter *adapter = netdev_priv(netdev);
>>  	struct ixgbe_ring *tx_ring;
>>
>> +	if (!netif_carrier_ok(netdev)) {
>> +		dev_kfree_skb_any(skb);
>> +		return NETDEV_TX_OK;
>> +	}
>> +
>
>I would much prefer that this check moves into netpoll's
>direct invocation of
>->ndo_start_xmit().
>
>Otherwise every driver will start to add this check and that
>kind of duplication doesn't make any sense at all.

That would work, but what if there are other callers of ndo_start_xmit that don't have this check? Handling this in the driver takes care of all instances.

Specifically this issue was seen with netconsole, but we also had reports of the same issue where I'm not sure netconsole was the culprit (I just don't have enough info about the setup).

If the netif_carrier_ok() check in ixgbe_start_xmit() is not acceptable we'll still have to plug a possible issue in ixgbe_watchdog_flush_tx() where a call to ndo_start_xmit may fill the rings after the HW reset and cause the driver to go into a reset loop.

Thanks,
Emil

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ