kp
6ab3759e1c
bpf: Fix incorrect cleanup
...
Cleaning up a bpf_if is a two stage process. We first move it to the
bpf_freelist (in bpfdetach()) and only later do we actually free it (in
bpf_ifdetach()).
We cannot set the ifp->if_bpf to NULL from bpf_ifdetach() because it's
possible that the ifnet has already gone away, or that it has been assigned
a new bpf_if.
This can lead to a struct ifnet which is up, but has if_bpf set to NULL,
which will panic when we try to send the next packet.
Keep track of the pointer to the bpf_if (because it's not always
ifp->if_bpf), and NULL it immediately in bpfdetach().
PR: 213896
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D11782
2017-08-16 19:40:07 +00:00
..
2017-05-17 00:34:34 +00:00
2017-02-28 23:42:47 +00:00
2017-05-17 00:34:34 +00:00
2017-04-17 22:02:09 +00:00
2017-04-17 22:02:09 +00:00
2017-08-16 19:40:07 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-15 07:22:47 +00:00
2017-07-24 03:32:10 +00:00
2017-05-10 18:33:40 +00:00
2017-01-18 13:31:17 +00:00
2017-02-28 23:42:47 +00:00
2016-09-15 07:41:48 +00:00
2017-02-28 23:42:47 +00:00
2017-04-29 08:52:07 +00:00
2017-01-25 21:25:26 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-01-18 13:31:17 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-08-09 12:24:07 +00:00
2017-07-31 11:04:35 +00:00
2017-04-08 04:50:50 +00:00
2017-07-24 03:32:10 +00:00
2017-02-22 02:35:59 +00:00
2017-02-28 23:42:47 +00:00
2017-04-11 08:56:18 +00:00
2017-04-11 08:56:18 +00:00
2017-03-07 00:13:53 +00:00
2017-02-06 08:49:57 +00:00
2017-02-22 02:35:59 +00:00
2017-07-25 14:41:50 +00:00
2017-05-25 23:19:09 +00:00
2017-05-17 00:34:34 +00:00
2016-10-11 17:41:13 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-04-11 08:56:18 +00:00
2017-05-17 00:34:34 +00:00
2017-05-10 18:33:40 +00:00
2017-07-28 04:41:57 +00:00
2017-02-28 23:42:47 +00:00
2017-05-10 22:13:47 +00:00
2017-08-15 17:52:37 +00:00
2017-05-10 22:13:47 +00:00
2017-02-28 23:42:47 +00:00
2017-03-13 22:53:06 +00:00
2017-08-10 03:43:23 +00:00
2017-07-27 21:21:43 +00:00
2017-02-28 23:42:47 +00:00
2017-02-19 02:03:09 +00:00
2017-04-24 21:21:49 +00:00
2017-07-21 03:42:09 +00:00
2016-10-27 09:46:22 +00:00
2016-10-27 09:46:22 +00:00
2017-04-03 13:35:04 +00:00
2017-04-03 13:35:04 +00:00
2017-03-07 00:13:53 +00:00
2017-03-22 21:18:18 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-07-24 03:59:50 +00:00
2017-02-28 23:42:47 +00:00
2017-07-27 13:03:36 +00:00
2017-06-13 10:52:31 +00:00
2017-04-08 04:37:01 +00:00
2017-05-17 00:34:34 +00:00
2017-02-28 23:42:47 +00:00