Summary: | pptpd + vlan panic | ||||||
---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | Emmanuel Vadot <manu> | ||||
Component: | kern | Assignee: | Kristof Provost <kp> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Some People | CC: | emaste, glebius, kp, markj | ||||
Priority: | --- | Keywords: | crash | ||||
Version: | CURRENT | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
See Also: | https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=257067 | ||||||
Attachments: |
|
Description
Emmanuel Vadot
2020-08-28 08:15:17 UTC
Created attachment 217588 [details]
patch
There is a general problem in that netgraph is not fully VNET-aware and does not set the current VNET when calling into the network stack in some cases. See r363735 for a recent example. I think this patch will fix it, though it's really just a bandaid.
I have this: https://reviews.freebsd.org/D26226 I wouldn't expect setting the VNET (which may also be required though) to fix an assertion failure because we're not in NET_EPOCH. > https://reviews.freebsd.org/D26226
Right now reviews.freebsd.org is returning 502 for me, so I can't comment there.
I believe the patch is incorrect there. In the new epoch synced network stack the packet flow of netgraph shall all be covered by epoch. And eventually netgraph internal synchronization shall be converted to epoch. Thus, this is responsibility of an entrance nodes to enter the epoch, not the exit nodes.
ng_socket does that. However, there is one peculiarity, see r358193.
In this particular case what happens in ng_pppoe is that control message call (not covered by epoch) sends a packet down the node, which should be covered by epoch. So, this is ng_pppoe's ng_pppoe_rcvmsg() that needs to enter epoch until some better solution is devised to address the problem described in r358193.
(In reply to Gleb Smirnoff from comment #3) Thanks. I've updated the patch. A commit references this bug: Author: kp Date: Wed Sep 2 11:49:23 UTC 2020 New revision: 365246 URL: https://svnweb.freebsd.org/changeset/base/365246 Log: ng_ether: Enter NET_EPOCH where required We must enter NET_EPOCH before calling ether_output_frame(). Several of the functions it calls (pfil_run_hooks, if_transmit) expect to be running in the NET_EPOCH. While here remove an unneeded EPOCH entry (which wasn't wide enough to cover BRIDGE_INPUT). PR: 248958 Reviewed by: glebius, bz (previous version), melifaro (previous version) Tested by: manu Differential Revision: https://reviews.freebsd.org/D26226 Changes: head/sys/netgraph/ng_ether.c head/sys/netgraph/ng_pppoe.c ^Triage: assign to committer for possible MFC consideration. |