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] [day] [month] [year] [list]
Message-ID: <CACVXFVNkRbK8NhAbR0+dNNdbvZUNW7dyKw8fELz6csmZxSiTPQ@mail.gmail.com>
Date:	Wed, 13 Jun 2012 17:21:40 +0800
From:	Ming Lei <tom.leiming@...il.com>
To:	Bjørn Mork <bjorn@...k.no>
Cc:	Oliver Neukum <oliver@...kum.org>,
	"David S. Miller" <davem@...emloft.net>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	netdev@...r.kernel.org, linux-usb@...r.kernel.org
Subject: Re: [PATCH 4/7] usbnet: remove EVENT_DEV_OPEN flag

On Wed, Jun 13, 2012 at 4:28 PM, Bjørn Mork <bjorn@...k.no> wrote:
>
> BTW, does the "&& (dev->net->flags & IFF_UP)" really make any
> difference, or could the test be simplified to
>
>    (netif_running(dev->net))

Neither netif_running(dev->net) nor  (dev->net->flags & IFF_UP)
is enough.

In the start of usbnet_open(), the usb device may be waken up and
usbnet_resume will see netif_running(dev->net) in the situation, so
may cause problem since the interface hasn't been UP yet.

If just checking on (dev->net->flags & IFF_UP), it still may cause
problem in usbnet_resume as pointed by Oliver.

So looks only checking on both netif_running(dev->net) and
(dev->net->flags & IFF_UP) is OK.

Thanks,
-- 
Ming Lei
--
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