Patchwork UBUNTU: (pre-upstream) FEC: Fix kernel panic in fec_set_mac_address.

login
register
mail settings
Submitter Bryan Wu
Date May 5, 2010, 10:19 a.m.
Message ID <1273054777-6831-1-git-send-email-bryan.wu@canonical.com>
Download mbox | patch
Permalink /patch/51684/
State Accepted
Delegated to: Stefan Bader
Headers show

Comments

Bryan Wu - May 5, 2010, 10:19 a.m.
From: Mattias Walstrom <mattias@vmlinux.org>

BugLink: http://bugs.launchpad.net/bugs/575558

Fix memory corruption that sometimes result in kernel panic.

Signed-off-by: Mattias Walström <mattias@vmlinux.org>
Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
---
 drivers/net/fec.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Andy Whitcroft - May 5, 2010, 12:21 p.m.
On Wed, May 05, 2010 at 06:19:37PM +0800, Bryan Wu wrote:
> From: Mattias Walstrom <mattias@vmlinux.org>
> 
> BugLink: http://bugs.launchpad.net/bugs/575558
> 
> Fix memory corruption that sometimes result in kernel panic.
> 
> Signed-off-by: Mattias Walström <mattias@vmlinux.org>
> Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
> ---
>  drivers/net/fec.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/net/fec.c b/drivers/net/fec.c
> index 2280373..d63d18c 100644
> --- a/drivers/net/fec.c
> +++ b/drivers/net/fec.c
> @@ -1049,7 +1049,7 @@ fec_set_mac_address(struct net_device *dev, void *p)
>  		(dev->dev_addr[1] << 16) | (dev->dev_addr[0] << 24),
>  		fep->hwp + FEC_ADDR_LOW);
>  	writel((dev->dev_addr[5] << 16) | (dev->dev_addr[4] << 24),
> -		fep + FEC_ADDR_HIGH);
> +		fep->hwp + FEC_ADDR_HIGH);
>  	return 0;
>  }

Seems obviously correct.

Acked-by: Andy Whitcroft <apw@canonical.com>

-apw
Colin King - May 5, 2010, 12:46 p.m.
On Wed, 2010-05-05 at 18:19 +0800, Bryan Wu wrote:
> From: Mattias Walstrom <mattias@vmlinux.org>
> 
> BugLink: http://bugs.launchpad.net/bugs/575558
> 
> Fix memory corruption that sometimes result in kernel panic.
> 
> Signed-off-by: Mattias Walström <mattias@vmlinux.org>
> Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
> ---
>  drivers/net/fec.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/net/fec.c b/drivers/net/fec.c
> index 2280373..d63d18c 100644
> --- a/drivers/net/fec.c
> +++ b/drivers/net/fec.c
> @@ -1049,7 +1049,7 @@ fec_set_mac_address(struct net_device *dev, void *p)
>  		(dev->dev_addr[1] << 16) | (dev->dev_addr[0] << 24),
>  		fep->hwp + FEC_ADDR_LOW);
>  	writel((dev->dev_addr[5] << 16) | (dev->dev_addr[4] << 24),
> -		fep + FEC_ADDR_HIGH);
> +		fep->hwp + FEC_ADDR_HIGH);
>  	return 0;
>  }
>  
Yep, looks good to me.

Acked-by: Colin King <colin.king@canonical.com>
Leann Ogasawara - May 5, 2010, 5:07 p.m.
Applied to Maverick.

Thanks,
Leann
Tim Gardner - May 5, 2010, 7:49 p.m.
On 05/05/2010 12:19 PM, Bryan Wu wrote:
> From: Mattias Walstrom<mattias@vmlinux.org>
>
> BugLink: http://bugs.launchpad.net/bugs/575558
>
> Fix memory corruption that sometimes result in kernel panic.
>
> Signed-off-by: Mattias Walström<mattias@vmlinux.org>
> Signed-off-by: Bryan Wu<bryan.wu@canonical.com>
> ---
>   drivers/net/fec.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/fec.c b/drivers/net/fec.c
> index 2280373..d63d18c 100644
> --- a/drivers/net/fec.c
> +++ b/drivers/net/fec.c
> @@ -1049,7 +1049,7 @@ fec_set_mac_address(struct net_device *dev, void *p)
>   		(dev->dev_addr[1]<<  16) | (dev->dev_addr[0]<<  24),
>   		fep->hwp + FEC_ADDR_LOW);
>   	writel((dev->dev_addr[5]<<  16) | (dev->dev_addr[4]<<  24),
> -		fep + FEC_ADDR_HIGH);
> +		fep->hwp + FEC_ADDR_HIGH);
>   	return 0;
>   }
>
>

Acked-by: Tim Gardner <tim.gardner@canonical.com>
Stefan Bader - May 7, 2010, 3:23 p.m.
Applied to Lucid fsl-imx51

Patch

diff --git a/drivers/net/fec.c b/drivers/net/fec.c
index 2280373..d63d18c 100644
--- a/drivers/net/fec.c
+++ b/drivers/net/fec.c
@@ -1049,7 +1049,7 @@  fec_set_mac_address(struct net_device *dev, void *p)
 		(dev->dev_addr[1] << 16) | (dev->dev_addr[0] << 24),
 		fep->hwp + FEC_ADDR_LOW);
 	writel((dev->dev_addr[5] << 16) | (dev->dev_addr[4] << 24),
-		fep + FEC_ADDR_HIGH);
+		fep->hwp + FEC_ADDR_HIGH);
 	return 0;
 }