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]
Message-ID: <564B3A3E.50905@cumulusnetworks.com>
Date:	Tue, 17 Nov 2015 15:31:26 +0100
From:	Nikolay Aleksandrov <nikolay@...ulusnetworks.com>
To:	Michał Mirosław <mirq-linux@...e.qmqm.pl>,
	Nikolay Aleksandrov <razor@...ckwall.org>
Cc:	netdev@...r.kernel.org, davem@...emloft.net
Subject: Re: [PATCH net] net: fix __netdev_update_features return on
 ndo_set_features failure

On 11/17/2015 02:54 PM, Michał Mirosław wrote:
> On Fri, Nov 13, 2015 at 03:20:24PM +0100, Nikolay Aleksandrov wrote:
>> From: Nikolay Aleksandrov <nikolay@...ulusnetworks.com>
>>
>> If ndo_set_features fails __netdev_update_features() will return -1 but
>> this is wrong because it is expected to return 0 if no features were
>> changed (see netdev_update_features()), which will cause a netdev
>> notifier to be called without any actual changes. Fix this by returning
>> 0 if ndo_set_features fails.
> 
> Hmm. In case ndo_update_features() failed it might have changed the features.
> The assumption I made was that we're better off initiating spurious notification
> than miss one. This is an unlikely event - a bug in a driver or problem with the HW.
> 
> Best Regards,
> Michał Mirosław
> 

Hmm, good point. I went over a dozen drivers and I can see that some might
actually do that (e.g. bnx2x in bnx2x_set_features()). It's rare but possible,
most of them return only 0.
Okay then, I'll revert this change and add a comment with this so it's clear
in the future.

Thanks for the feedback,
 Nik

--
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