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:	Tue, 01 Mar 2016 17:21:53 -0500 (EST)
From:	David Miller <davem@...emloft.net>
To:	amitoj1606@...il.com
Cc:	netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	julia.lawall@...6.fr
Subject: Re: [PATCH] wan: lmc: Switch to using managed resources

From: Amitoj Kaur Chawla <amitoj1606@...il.com>
Date: Sat, 27 Feb 2016 22:34:16 +0530

> @@ -835,23 +835,20 @@ static int lmc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
>  	err = pci_request_regions(pdev, "lmc");
>  	if (err) {
>  		printk(KERN_ERR "lmc: pci_request_region failed\n");
> -		goto err_req_io;
> +		return err;
>  	}
>  
>  	/*
>  	 * Allocate our own device structure
>  	 */
> -	sc = kzalloc(sizeof(lmc_softc_t), GFP_KERNEL);
> -	if (!sc) {
> -		err = -ENOMEM;
> -		goto err_kzalloc;

You can't get rid of the error paths from here on out, because you still need to
release the PCI regions obtained from pci_request_regions() above.

To be quite honest, unless you are fixing real bugs, managed resource
converstions are more likely to add bugs than do anything truly
useful.

I strongly consider you just drop this change.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ