Kristof Provost f5e0d9fcb4 pf: Fix panic on invalid DIOCRSETTFLAGS
If during DIOCRSETTFLAGS pfrio_buffer is NULL copyin() will fault, which we're
not allowed to do with a lock held.
We must count the number of entries in the table and release the lock during
copyin(). Only then can we re-acquire the lock. Note that this is safe, because
pfr_set_tflags() will check if the table and entries exist.

This was discovered by a local syzcaller instance.

MFC after:	1 week
Event:		Aberdeen hackathon 2019
2019-04-17 16:42:54 +00:00
..
2019-03-29 20:21:28 +00:00
2019-04-16 13:26:31 +00:00
2019-04-10 19:18:05 +00:00
2019-04-10 18:15:36 +00:00
2019-04-16 19:46:02 +00:00
2019-02-21 01:30:37 +00:00
2019-03-25 07:48:52 +00:00
2019-02-04 21:28:25 +00:00