Thread (5 messages) 5 messages, 4 authors, 2012-11-29

Re: [PATCH] smsc95xx: fix suspend buffer overflow

From: Joe Perches <joe@perches.com>
Date: 2012-11-29 04:54:28

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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help