On Thu, Sep 21, 2017 at 08:16:11PM +0000, Eugene Grosbein wrote:
E> Author: eugen (ports committer)
E> Date: Thu Sep 21 20:16:10 2017
E> New Revision: 323873
E> URL: https://svnweb.freebsd.org/changeset/base/323873
E> 
E> Log:
E>   Unprotected modification of ng_iface(4) private data leads to kernel panic.
E>   Fix a race with per-node read-mostly lock and refcounting for a hook.

The patch is far from ideal. Netgraph already has internal locking,
which guarantess write semantics for "disconnect" and "newhook"
scenarios. As well as read semantics for "rcvdata".

Since ng_iface is a gate node, that gates data between netgraph and the
big network stack, it of course needs extra locking in the interface
output method. But better piggyback on the netgraph locking, rather than
add your own, IMHO.

-- 
Gleb Smirnoff
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to