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:	Wed, 22 Sep 2010 01:24:42 +0100
From:	Ben Dooks <ben-i2c@...ff.org>
To:	Michael Williamson <michael.williamson@...ticallink.com>
Cc:	linux-i2c@...r.kernel.org, linux-kernel@...r.kernel.org,
	ben-linux@...ff.org, khilman@...prootsystems.com,
	chaithrika@...com, pjohn@...mvista.com, nageswari@...com,
	dirk.behme@...il.com
Subject: Re: [PATCH] i2c-davinci: Fix use of default platform data if none
	supplied.

On Sat, Sep 04, 2010 at 12:07:48PM -0400, Michael Williamson wrote:
> There is a bug in the i2c-davinci device init routine that attempts
> to use default platform data if none is supplied (e.g., is NULL).
> This patch fixes the bug.
> 
> Signed-off-by: Michael Williamson <michael.williamson@...ticallink.com>
> ---
>  drivers/i2c/busses/i2c-davinci.c |    8 +++++---
>  1 files changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c
> index 2222c87..6d4eeeb 100644
> --- a/drivers/i2c/busses/i2c-davinci.c
> +++ b/drivers/i2c/busses/i2c-davinci.c
> @@ -235,10 +235,12 @@ static void i2c_davinci_calc_clk_dividers(struct davinci_i2c_dev *dev)
>   */
>  static int i2c_davinci_init(struct davinci_i2c_dev *dev)
>  {
> -	struct davinci_i2c_platform_data *pdata = dev->dev->platform_data;
> +	struct davinci_i2c_platform_data *pdata;
>  
> -	if (!pdata)
> -		pdata = &davinci_i2c_platform_data_default;
> +	if (!dev->dev->platform_data)
> +		dev->dev->platform_data = &davinci_i2c_platform_data_default;
> +
> +	pdata = dev->dev->platform_data;

At first glance this looks like a code shift, however is the platform
data used later in the driver by referencing the device.platform_data
field?

Could you rewrite the header to show this, and if possible note any
actual oops report that has been seen with this.

-- 
Ben

Q:      What's a light-year?
A:      One-third less calories than a regular year.

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