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-next>] [day] [month] [year] [list]
Date:	Tue, 08 Jul 2014 20:42:18 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	sowmini.varadhan@...cle.com
Cc:	netdev@...r.kernel.org, dave.kleikamp@...cle.com,
	dan.carpenter@...cle.com
Subject: Re: [PATCH net-next] sunvnet: call unregister_netdev() exactly
 once per device

From: sowmini.varadhan@...cle.com
Date: Tue, 8 Jul 2014 12:18:27 -0400

> unregister_netdev the parent net_device only after
> the last port in the port_list of a `struct vnet'
> is removed when the vnet is dismantled. Moreover,
> this should only be done if the net_device was
> successfully registered.
> 
> Without this fix, 'modprobe -r sunvnet' could
> trigger the following in rollback_registered_many()
> 5693   BUG_ON(dev->reg_state != NETREG_REGISTERED);
> 
> Signed-off-by: Sowmini Varadhan <sowmini.varadhan@...cle.com>
> Acked-by: Dave Kleikamp <dave.kleikamp@...cle.com>
> Acked-by: Dan Carpenter <dan.carpenter@...cle.com>

This is definitely not the right fix, you're just removing a symptom
of a much larger problem.

And that problem is that nothing cleans up the objects created by
vnet_new(), they are completely leaked.

vnet_exit(), after doing the vio_unregister_driver(), should call a
helper function that iterates over vnet_list and cleans up those
objects.

That's where the unregister_netdevice() belongs, not in vnet_port_remove().
--
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