]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
rangelock: add rangelock_cookie_assert
authorkevans <kevans@FreeBSD.org>
Sun, 15 Sep 2019 02:59:53 +0000 (02:59 +0000)
committerkevans <kevans@FreeBSD.org>
Sun, 15 Sep 2019 02:59:53 +0000 (02:59 +0000)
commit0beaa1237c5e6d0ef2018675bd905a2a280f01c8
tree2eab350b472f52555767d95190a69cec31347684
parent76cd763d2956d1e7c48bc4a5ab2288d8cb5ab7d4
rangelock: add rangelock_cookie_assert

A future change to posixshm to add file sealing (in DIFF_21391[0] and child)
will move locking out of shm_dotruncate as kern_shm_open() will require the
lock to be held across the dotruncate until the seal is actually applied.
For this, the cookie is passed into shm_dotruncate_locked which asserts
RCA_WLOCKED.

[0] Name changed to protect the innocent, hopefully, from getting autoclosed
due to this reference...

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D21628
sys/kern/kern_rangelock.c
sys/sys/rangelock.h