diff options
author | Davide Ciminaghi <ciminaghi@gnudd.com> | 2012-04-13 04:48:25 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-27 09:51:20 -0700 |
commit | 33e5a8b74671581e307aabc59c415190df0c121b (patch) | |
tree | d3148590ea7fb03e98cb56495c7da9c99da959cd /drivers/net/e1000 | |
parent | 8b20a647671ec0f48a22bbd44a52b8e914914140 (diff) | |
download | linux-33e5a8b74671581e307aabc59c415190df0c121b.tar.gz |
net/ethernet: ks8851_mll fix rx frame buffer overflow
[ Upstream commit 8a9a0ea6032186e3030419262678d652b88bf6a8 ]
At the beginning of ks_rcv(), a for loop retrieves the
header information relevant to all the frames stored
in the mac's internal buffers. The number of pending
frames is stored as an 8 bits field in KS_RXFCTR.
If interrupts are disabled long enough to allow for more than
32 frames to accumulate in the MAC's internal buffers, a buffer
overflow occurs.
This patch fixes the problem by making the
driver's frame_head_info buffer big enough.
Well actually, since the chip appears to have 12K of
internal rx buffers and the shortest ethernet frame should
be 64 bytes long, maybe the limit could be set to
12*1024/64 = 192 frames, but 255 should be safer.
Signed-off-by: Davide Ciminaghi <ciminaghi@gnudd.com>
Signed-off-by: Raffaele Recalcati <raffaele.recalcati@bticino.it>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net/e1000')
0 files changed, 0 insertions, 0 deletions