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:	Sat, 28 Mar 2015 05:20:37 +0100
From:	Lino Sanfilippo <LinoSanfilippo@....de>
To:	Hariprasad S <hariprasad@...lsio.com>
CC:	netdev@...r.kernel.org, davem@...emloft.net, leedom@...lsio.com,
	anish@...lsio.com, nirranjan@...lsio.com, kumaras@...lsio.com,
	swise@...ngridcomputing.com
Subject: Re: [PATCH net 2/2] cxgb4: Disable interrupts and napi before unregistering
 netdev

On 27.03.2015 09:54, Hariprasad S wrote:

>> 
>> just out of curiousity: How can an unregister of a netdevice lead to a
>> crash caused by traffic? I understand that _freeing_ the device or other
>> resources is a bad idea as long as irqs are still active. But unregister
>> should not do anything critical (i am asking since I want to avoid such
>> problems in my own drivers).
>> 
>> Regards,
>> Lino
>> 
> 
> When device is unregistered ip_ptr of net_device structure is set to NULL.
> Since NAPI is not disabled, every packet goes through ip_error() check.
> And in ip_error() function when in_device structure is obtained from netdevice
> structure, it ends up in NULL pointer dereference since ip_ptr is already NULL.
> 
> Regards,
> Hari
> 

Ah ok, that makes sense. I missed the cleanup done due to netdev
notifier calls (in this case ip_netdev_notifier). Thanks for pointing
this out.

Regards,
Lino
--
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