Konstantin Belousov 6ae26d06dc Exit notification for EVFILT_PROC removes knote from the knlist. In
particular, this invalidates the knote kn_link linkage, making the
SLIST_FOREACH() loop accessing undefined values (e.g. trashed by
QUEUE_MACRO_DEBUG).  If the knote is freed by other thread when kq
lock is released or when influx is cleared, e.g. by knote_scan() for
kqueue owning the knote, the iteration step would access freed memory.

Use SLIST_FOREACH_SAFE() to fix iteration.

Diagnosed by:	avg
Tested by:	avg, lstewart, pawel
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2015-09-01 14:05:29 +00:00
..
2015-08-28 20:06:58 +00:00
2015-07-20 09:37:42 +00:00
2015-04-22 14:38:58 +00:00
2015-06-30 17:00:45 +00:00
2015-01-22 11:12:42 +00:00
2014-03-14 06:29:43 +00:00
2015-06-30 17:00:45 +00:00
2014-06-26 13:57:44 +00:00
2014-08-11 15:06:07 +00:00
2015-01-22 11:12:42 +00:00
2015-06-10 10:48:12 +00:00
2015-07-29 17:18:27 +00:00
2015-07-11 15:22:11 +00:00
2015-07-11 15:22:11 +00:00
2015-07-11 15:22:11 +00:00
2015-06-10 10:48:12 +00:00
2015-03-17 14:16:50 +00:00
2015-08-01 07:21:14 +00:00
2015-07-30 15:43:26 +00:00