]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
pf: fix pagefault in pf_getstatus()
authorKristof Provost <kp@FreeBSD.org>
Thu, 23 Sep 2021 08:39:49 +0000 (10:39 +0200)
committerKristof Provost <kp@FreeBSD.org>
Thu, 30 Sep 2021 07:54:44 +0000 (09:54 +0200)
commit9419d273e4718ee8c768865cd73a3b907f365d8d
treeb03763f053fde0bb0cb070b6e9c2c0c425a0d67c
parent3c25f7e860d8dc18aaa370352cb968df65c176f5
pf: fix pagefault in pf_getstatus()

We can't copyout() while holding a lock, in case it triggers a page
fault.
Release the lock before copyout, which is safe because we've already
copied all the data into the nvlist.

PR: 258601
Reviewed by: mjg
MFC after: 1 week
Sponsored by: Modirum MDPay
Differential Revision: https://reviews.freebsd.org/D32076

(cherry picked from commit cb13059663e455b3fc69c293dadec53c164490dc)
sys/netpfil/pf/pf_ioctl.c