[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20091213.023951.240636069.davem@davemloft.net>
Date: Sun, 13 Dec 2009 02:39:51 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: julia@...u.dk
Cc: florian@...nwrt.org, netdev@...r.kernel.org
Subject: Re: question about drivers/net/cpmac.c
From: Julia Lawall <julia@...u.dk>
Date: Sun, 13 Dec 2009 11:22:54 +0100 (CET)
> The function __devinit cpmac_probe in the file drivers/net/cpmac.c
> contains the following code:
>
> memcpy(dev->dev_addr, pdata->dev_addr, sizeof(dev->dev_addr));
>
> Is it correct that the size of the pointer is what is wanted?
Everything that does sizeof(netdev->dev_addr) is a bug.
At some point we changed netdev->dev_addr from an array of chars to a
pointer to a dynamically allocated buffer.
So these cases worked before that change and need to be updated
in order to be correct.
Looking quickly there are a couple of these things under
drivers/net
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists