HomeFreeBSD

posixshm: Fix lock leak when mac_posixshm_check_read rejects read.

Description

posixshm: Fix lock leak when mac_posixshm_check_read rejects read.

While reading the code, I noticed that shm_read() returns without unlocking
foffset and rangelock if mac_posixshm_check_read() rejects the read.

Reviewed by: kib, jhb, rwatson
Approved by: re (gjb)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D6927

Details

Provenance
jillesAuthored on
Reviewer
kib
Differential Revision
D6927: posixshm: Fix lock leak when mac_posixshm_check_read rejects read.
Parents
rS302150: Switch geom_disk over to using a pool mutex.
Branches
Unknown
Tags
Unknown