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:	Mon, 16 Jul 2012 22:49:02 +0900
From:	Namjae Jeon <linkinjeon@...il.com>
To:	Vinayak Holikatti <vinholikatti@...il.com>
Cc:	James.Bottomley@...senpartnership.com, linux-scsi@...r.kernel.org,
	linux-kernel@...r.kernel.org, patches@...aro.org,
	linux-samsung-soc@...r.kernel.org, santoshsy@...il.com,
	arnd@...aro.org, girish.shivananjappa@...aro.org,
	saugata.das@...aro.org, vishak.g@...sung.com, venkat@...aro.org,
	k.rajesh@...sung.com, dsaxena@...aro.org, ilho215.lee@...sung.com,
	nala.la@...sung.com, sreekumar.c@...sung.com
Subject: Re: [PATCH V2 3/4] [SCSI] ufs: Add Platform glue driver for ufshcd

Hi Vinayak.
> + * ufshcd_pltfrm_remove - remove platform driver routine
> + * @pdev: pointer to platform device handle
> + *
> + * Returns 0 on success, non-zero value on failure
> + */
> +static int __devexit ufshcd_pltfrm_remove(struct platform_device *pdev)
> +{
> +	struct resource *mem_res;
> +	struct resource *irq_res;
> +	resource_size_t mem_size;
> +	struct ufs_hba *hba =  platform_get_drvdata(pdev);
> +
> +	ufshcd_remove(hba);
> +	irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
> +	if (!irq_res)
> +		dev_err(&pdev->dev, "ufshcd: IRQ resource not available\n");
> +	free_irq(irq_res->start, hba);
Is there no possibility of null pointer dereferencing error ?(irq_res->start)
I think that free_irq should be not called if irq_res is NULL.
> +	mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
Looks mem_res is also same with upper case.
Thanks.
> +	mem_size = resource_size(mem_res);
> +	release_mem_region(mem_res->start, mem_size);
> +	platform_set_drvdata(pdev, NULL);
> +	return 0;
> +}
> +
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ