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] [day] [month] [year] [list]
Date:	Tue, 10 Mar 2015 10:28:44 -0000
From:	"Gilad Broner" <gbroner@...eaurora.org>
To:	"Tapasweni Pathak" <tapaswenipathak@...il.com>
Cc:	vinholikatti@...il.com, jbottomley@...allels.com,
	linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
	tapaswenipathak@...il.com, julia.lawall@...6.fr
Subject: Re: [PATCH] drivers: scsi: ufs: Fix possible null derefrence

> Check for null before being dereferenced to avoid a invalid null
> dereference.
>
> Found using Coccinelle.
>
> Signed-off-by: Tapasweni Pathak <tapaswenipathak@...il.com>
> Acked-by: Julia Lawall <julia.lawall@...6.fr>
> ---
>  drivers/scsi/ufs/ufshcd.c |    7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index 5d60a86..c54e64f 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -4268,12 +4268,15 @@ static int ufshcd_config_vreg(struct device *dev,
>  		struct ufs_vreg *vreg, bool on)
>  {
>  	int ret = 0;
> -	struct regulator *reg = vreg->reg;
> -	const char *name = vreg->name;
> +	struct regulator *reg;
> +	const char *name;
>  	int min_uV, uA_load;
>
>  	BUG_ON(!vreg);


Please add to the patch fix for another instance of this  in
ufshcd_config_vreg_load():

static int ufshcd_config_vreg_load(struct device *dev,
    struct ufs_vreg *vreg, int ua)
{
	int ret = 0;
	struct regulator *reg = vreg->reg;
	const char *name = vreg->name;

	BUG_ON(!vreg);


Gilad.

-- 
Qualcomm Israel, on behalf of Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

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