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: <D5C1322C3E673F459512FB59E0DDC329036D2426@orsmsx414.amr.corp.intel.com>
Date:	Thu, 16 Aug 2007 10:09:58 -0700
From:	"Waskiewicz Jr, Peter P" <peter.p.waskiewicz.jr@...el.com>
To:	"Brandon Philips" <bphilips@...e.de>
Cc:	<netdev@...r.kernel.org>, <e1000-devel@...ts.sourceforge.net>,
	<teheo@...e.de>
Subject: RE: [patch 4/4] Update e1000 driver to use devres.

> Now if I insert a return -ENOMEM right after allocating tx_ring:
> --- a/drivers/net/e1000/e1000_main.c
> +++ b/drivers/net/e1000/e1000_main.c
> @@ -1356,6 +1356,8 @@ e1000_alloc_queues(struct e1000_adapter 
> *adapter)  {
>         adapter->tx_ring = kcalloc(adapter->num_tx_queues,
>                                    sizeof(struct 
> e1000_tx_ring), GFP_KERNEL);
> +
> +       return -ENOMEM;
>         if (!adapter->tx_ring)
>                 return -ENOMEM;
> 
> #insmod
> DEVRES ADD f7a80e80 pcim_release (8 bytes) DEVRES ADD 
> f7a80ca0 devm_free_netdev (4 bytes) DEVRES ADD eb7f0080 
> pcim_iomap_release (24 bytes) DEVRES ADD eb7f0000 
> devm_kzalloc_release (40 bytes)
> e1000_sw_init: Unable to allocate memory for queues DEVRES 
> REL eb7f0000 devm_kzalloc_release (40 bytes) DEVRES REL 
> eb7f0080 pcim_iomap_release (24 bytes) DEVRES REL f7a80ca0 
> devm_free_netdev (4 bytes) DEVRES REL f7a80e80 pcim_release (8 bytes)
> ACPI: PCI interrupt for device 0000:02:00.0 disabled
> e1000: probe of 0000:02:00.0 failed with error -12
> 
> Since we are returning an error from probe the driver core calls
> devres_release_all(dev) which releases all of the resources 
> in the right order.  See really_probe() in drivers/base/dd.c.

This looks fine then to me.  Thanks for the explanation.

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