lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  popa3d-users  crypt-dev  /  oss-security  kernel-hardening  xvendor  musl  sabotage  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4 
Open Source and information security mailing list archives
Looking for a web hosting provider? Try DreamHost (enter the promo code WAIVE to waive the $49.95 setup fee)
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 11 Jul 2010 18:13:00 -0700 (PDT)
From:	David Miller <>
Subject: Re: [PATCH] depca: fix leaks

From: Kulikov Vasiliy <>
Date: Fri,  9 Jul 2010 16:36:25 +0400

> Since some of xxx_register_driver() can return error we must continue
> with already registered drivers. If any of xxx_register_driver()
> succeeded or depca_platform_probe() found any device then
> depca_module_init() returns ok. In depca_module_exit() we must
> unregister only registered drivers.
> Signed-off-by: Kulikov Vasiliy <>

Driver registry should succeed except in cases that would indicate a
serious driver bug, such as trying to register the same driver twice.

Therefore if any registry fails, we should fail the entire probe.

This is the scheme used in just about any driver I've had any
involvement in, see for example drivers/net/niu.c:

	err = of_register_driver(&niu_of_driver, &of_bus_type);

	if (!err) {
		err = pci_register_driver(&niu_pci_driver);
		if (err)

	return err;

Please do something similar here in depca, thanks.
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to
More majordomo info at

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux - Powered by OpenVZ