]> git.baikalelectronics.ru Git - kernel.git/commit
tg3: Prevent rx producer ring overruns
authorMatt Carlson <mcarlson@broadcom.com>
Fri, 12 Feb 2010 14:47:06 +0000 (14:47 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 13 Feb 2010 01:05:51 +0000 (17:05 -0800)
commita4773785b6d39b26fb898b6ec6030f873925a429
tree65eb1cc57512cd6cf3f0ca1403c78e974d9ebc74
parent4c30acf960020c31aa0289dd2fdf3eb5b9f502f4
tg3: Prevent rx producer ring overruns

When operating in RSS mode, it is possible for one rx return ring to
submit enough rx buffers back to the hardware such that it inadvertently
overwrites data needed by another rx return ring.  This patch addresses
the problem by looking for non-NULL skb pointers in the
rx_[std|jmb]_buffers rings that parallel the rx producer rings.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tg3.c