[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1354164866.29762.24.camel@joe-AO722>
Date: Wed, 28 Nov 2012 20:54:26 -0800
From: Joe Perches <joe@...ches.com>
To: Steve Glendinning <steve@...well.net>
Cc: Steve Glendinning <steve.glendinning@...well.net>,
netdev <netdev@...r.kernel.org>,
Dan Carpenter <dan.carpenter@...cle.com>
Subject: Re: [PATCH] smsc95xx: fix suspend buffer overflow
On Wed, 2012-11-28 at 18:06 +0000, Steve Glendinning wrote:
> that filter code isn't pretty! If you have time
> to knock up a patch I'd be happy to test it.
Looking a bit at the code, I don't know how it's supposed to work.
This function seems broken:
static u16 smsc_crc(const u8 *buffer, size_t len, int filter)
{
return bitrev16(crc16(0xFFFF, buffer, len)) << ((filter % 2) * 16);
}
It always returns 0 when filter is odd.
I imagine 2 things:
o It should return u32
o when multiple WAKE_<foo> flags are set,
the code doesn't work properly.
--
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