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: <20071109170238.628fdf0d.akpm@linux-foundation.org>
Date:	Fri, 9 Nov 2007 17:02:38 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	"eric miao" <eric.y.miao@...il.com>
Cc:	linux-kernel@...r.kernel.org, szabolcs.gyurko@....hu,
	Evgeniy Polyakov <johnpol@....mipt.ru>
Subject: Re: [PATCH] make ds1wm driver to check ds1wm_platform_data pointer
 against NULL

On Fri, 9 Nov 2007 14:07:31 +0800
"eric miao" <eric.y.miao@...il.com> wrote:

> Do a sanity check for the "struct ds1wm_platform_data" pointer passed in
> by the platform_device, and so to enforce each platform to provide a
> valid structure.
> 
> Signed-off-by: eric miao <eric.miao@...vell.com>
> ---
>  drivers/w1/masters/ds1wm.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/w1/masters/ds1wm.c b/drivers/w1/masters/ds1wm.c
> index 5747997..11ce9ec 100644
> --- a/drivers/w1/masters/ds1wm.c
> +++ b/drivers/w1/masters/ds1wm.c
> @@ -351,6 +351,10 @@ static int ds1wm_probe(struct platform_device *pdev)
>  		goto err0;
>  	}
>  	plat = pdev->dev.platform_data;
> +	if (!plat) {
> +		ret = -ENXIO;
> +		goto err0;
> +	}
>  	ds1wm_data->bus_shift = plat->bus_shift;
>  	ds1wm_data->pdev = pdev;
>  	ds1wm_data->pdata = plat;

I don't understand this change.  Could you please provide some more details
regarding what problem it is solving?  How can pdev->dev.platform_data==NULL
come about?

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