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: <6627306.hr5KNyAzfJ@diego>
Date:	Thu, 18 Sep 2014 16:22:30 +0200
From:	Heiko Stübner <heiko@...ech.de>
To:	Axel Lin <axel.lin@...ics.com>
Cc:	Mark Brown <broonie@...nel.org>,
	Liam Girdwood <lgirdwood@...il.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] regulator: fan53555: Fix null pointer dereference

Am Donnerstag, 18. September 2014, 21:49:38 schrieb Axel Lin:
> Set di->regulator before dereference it.
> 
> Signed-off-by: Axel Lin <axel.lin@...ics.com>

damn ... thanks for catching this :-)

Reviewed-by: Heiko Stuebner <heiko@...ech.de>


> ---
>  drivers/regulator/fan53555.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/regulator/fan53555.c b/drivers/regulator/fan53555.c
> index 70b31bf..c82fb9e 100644
> --- a/drivers/regulator/fan53555.c
> +++ b/drivers/regulator/fan53555.c
> @@ -361,6 +361,7 @@ static int fan53555_regulator_probe(struct i2c_client
> *client, if (!di)
>  		return -ENOMEM;
> 
> +	di->regulator = pdata->regulator;
>  	if (client->dev.of_node) {
>  		const struct of_device_id *match;
> 
> @@ -389,7 +390,6 @@ static int fan53555_regulator_probe(struct i2c_client
> *client, return PTR_ERR(di->regmap);
>  	}
>  	di->dev = &client->dev;
> -	di->regulator = pdata->regulator;
>  	i2c_set_clientdata(client, di);
>  	/* Get chip ID */
>  	ret = regmap_read(di->regmap, FAN53555_ID1, &val);

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