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: <47025B50.4070501@hartkopp.net>
Date:	Tue, 02 Oct 2007 16:53:04 +0200
From:	Oliver Hartkopp <oliver@...tkopp.net>
To:	Arnaldo Carvalho de Melo <acme@...stprotocols.net>
CC:	Urs Thuermann <urs@...ogud.escape.de>, netdev@...r.kernel.org,
	David Miller <davem@...emloft.net>,
	Patrick McHardy <kaber@...sh.net>,
	Thomas Gleixner <tglx@...utronix.de>,
	YOSHIFUJI Hideaki <yoshfuji@...ux-ipv6.org>,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Oliver Hartkopp <oliver@...tkopp.net>,
	Oliver Hartkopp <oliver.hartkopp@...kswagen.de>,
	Urs Thuermann <urs.thuermann@...kswagen.de>
Subject: Re: [PATCH 3/7] CAN: Add raw protocol

Arnaldo Carvalho de Melo wrote:
> Em Tue, Oct 02, 2007 at 03:10:09PM +0200, Urs Thuermann escreveu:
>   
>
>> +
>> +		if (ro->bound && ro->ifindex)
>> +			dev = dev_get_by_index(&init_net, ro->ifindex);
>>     
>
> dev_get_by_index can fail, are you sure that raw_enable_filters can cope
> with this possibility?
>
>   

When dev_get_by_index() fails, the netdev is not there anymore.
In this case the netdev notifier handler already set ro->bound to 0.

Additionally raw_enable_filters() can handle *dev even when it's NULL.

Oliver


-
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