Signed-off-by: Quentin Thébault <quentin.thebault@defenso.fr>
Sponsored by: Defenso
Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 67297 Build 64180: arc lint + arc unit
Event Timeline
Comment Actions
Fix braces, indentation, restore original lock and set VNET
The VNET fix in ngdwrite was necessary to avoid a panic in
ng_ID2noderef (ng_base.c) when the ng_device is connected to
an ng_bridge node.
Comment Actions
Clean up device destruction
- Fix order of knlist_destroy() and mtx_destroy()
- Call knlist_clear() before knlist_destroy()
- Add NGDF_DYING flag to send off the reader properly
- Reverted unnecessary mtx changes in ngdread()
sys/netgraph/ng_device.c | ||
---|---|---|
534 | We do not hold the ngd_mtx here, so this check is racy. Presumably we should check immediately before going to sleep below? | |
586 | ||
632 | This is kind of misleading, as it reports only the number of bytes for the first packet in the queue, but we may have many packets available to read. The queue doesn't store the total number of bytes though, and probably we don't really want to traverse the whole queue to calculate the true number. I suggest adding a comment here explaining that. |