[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080320.142510.148381731.davem@davemloft.net>
Date: Thu, 20 Mar 2008 14:25:10 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: 12o3l@...cali.nl
Cc: netdev@...r.kernel.org
Subject: Re: drivers/net/niu.c: memcpy(dev->dev_addr, dev->perm_addr,
dev->addr_len)?
From: Roel Kluin <12o3l@...cali.nl>
Date: Thu, 20 Mar 2008 22:01:02 +0100
> in drivers/net/niu.c, line 6406, 6286 and 7173:
>
> memcpy(dev->dev_addr, dev->perm_addr, dev->addr_len);
>
> I noticed that "
>
> memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len)
>
> occurs much more often (15x). could it be that the first two arguments
> are swapped in niu.c?
No, these calls are correct. We are probing the device's permanent
ethernet address, we first place it into dev->dev_addr and then we
copy it into dev->perm_addr.
Please try to actually understand the pieces of strcpy and memcpy code
you are "finding bugs" in before posting to the list as these analysis
on false positives are going to eat up a lot of developer time.
I notice you posting several of these kinds of things.
--
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