Thread (9 messages) flat view 9 messages, 5 authors, 2009-05-13

Re: [PowerPC] Next May 8 boot failure: OOPS during ibmveth moduleinit

From: Jiri Pirko <hidden>
Date: 2009-05-12 08:16:44
Also in: linux-next, netdev

Tue, May 12, 2009 at 09:44:51AM CEST, sfr@canb.auug.org.au wrote:
Hi Dave,

This fixes it (I wonder if this bug is lurking in any other drivers):
Grepping the sources I see some other places suffering this problem. I'll send
patch for this.
From: Stephen Rothwell <redacted>
Date: Tue, 12 May 2009 17:24:02 +1000
Subject: [PATCH] net/ibmveth: fix panic in probe

netdev->dev_addr changed from being an array to being a pointer, so we
should not take its address for memcpy().
Nice!
Signed-off-by: Jiri Pirko <redacted>
quoted hunk ↗ jump to hunk
Signed-off-by: Stephen Rothwell <redacted>
---
drivers/net/ibmveth.c |    2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ibmveth.c b/drivers/net/ibmveth.c
index 7902e5e..8daffad 100644
--- a/drivers/net/ibmveth.c
+++ b/drivers/net/ibmveth.c
@@ -1285,7 +1285,7 @@ static int __devinit ibmveth_probe(struct vio_dev *dev, const struct vio_device_
 	netdev->features |= NETIF_F_LLTX;
	spin_lock_init(&adapter->stats_lock);

-	memcpy(&netdev->dev_addr, &adapter->mac_addr, netdev->addr_len);
+	memcpy(netdev->dev_addr, &adapter->mac_addr, netdev->addr_len);

	for(i = 0; i<IbmVethNumBufferPools; i++) {
		struct kobject *kobj = &adapter->rx_buff_pool[i].kobj;
-- 
1.6.3


-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help