summaryrefslogtreecommitdiffstats
path: root/contrib/diff/lib
diff options
context:
space:
mode:
authoryongari <yongari@FreeBSD.org>2010-06-05 23:29:24 +0000
committeryongari <yongari@FreeBSD.org>2010-06-05 23:29:24 +0000
commit6b70929829667f58f45504dfc9330a7f6d52dcc8 (patch)
treec0dedc76888f9ff7e2c9460d1bef68ec22afcaba /contrib/diff/lib
parentd568e764e9e97abcee15781a50ecc37d6773b322 (diff)
downloadFreeBSD-src-6b70929829667f58f45504dfc9330a7f6d52dcc8.zip
FreeBSD-src-6b70929829667f58f45504dfc9330a7f6d52dcc8.tar.gz
Fix a bug introduced in r199011. When bge(4) reuses loaded RX
buffers it should also reinitialize RX descriptors otherwise some stale data could be passed to controller. This could end up with mbuf double free or unexpected NULL pointer dereference in upper stack. To fix the issue, save loaded buffer's length and reinitialize RX descriptors with the saved value whenever bge(4) reuses the loaded RX buffers. While I'm here, increase the number of RX buffers to 512 from 256. This simplifies RX buffer handling as well as giving more RX buffers. Controller supports just fixed number of RX buffers (i.e. 512) and bge(4) used to rely on hope that our CPU is fast enough to keep up with the controller. With this change, bge(4) will use 1MB for RX buffers but I don't think it would cause problems in these days. Reported by: marcel Tested by: marcel
Diffstat (limited to 'contrib/diff/lib')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud