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:	Tue, 03 Jun 2014 15:24:49 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	kumaran.4353@...il.com
Cc:	steve.glendinning@...well.net, netdev@...r.kernel.org
Subject: Re: [PATCH 1/1] driver: net: smsc911x: set NOCARRIER flag in
 driver initialization

From: Balakumaran Kannan <kumaran.4353@...il.com>
Date: Tue, 3 Jun 2014 19:45:39 +0530

> On Sat, May 31, 2014 at 2:12 AM, David Miller <davem@...emloft.net> wrote:
>> From: Balakumaran Kannan <kumaran.4353@...il.com>
>> Date: Fri, 30 May 2014 18:35:43 +0530
>>
>>> All these drivers call netif_carrier_off function after registering
>>> the network device using register_netdev.
>>
>> I can quote more counter-examples than your list, starting with the
>> Broadcom tg3 driver.
> 
> Thank you David for this information. I'll send updated patch as version-2.
> 
> Still I couldn't understand the reason behind this. I should be grateful if you
> would explain me little bit.

At the moment you call register_netdev() the device is visible, notifications
are sent to userspace, and userland tools can try to bring the interface up
and see the incorrect link state, before you do the netif_carrier_off().

Said another way, between the register_netdev() and netif_carrier_off() call,
userspace can see the device in an inconsistent state.
--
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