Page MenuHomeFreeBSD

posixshm: Fix lock leak when mac_posixshm_check_read rejects read.
ClosedPublic

Authored by jilles on Jun 22 2016, 9:57 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 28, 5:05 AM
Unknown Object (File)
Thu, Nov 28, 5:01 AM
Unknown Object (File)
Nov 4 2024, 5:13 AM
Unknown Object (File)
Nov 4 2024, 5:13 AM
Unknown Object (File)
Nov 4 2024, 5:13 AM
Unknown Object (File)
Nov 4 2024, 5:05 AM
Unknown Object (File)
Oct 3 2024, 3:05 PM
Unknown Object (File)
Oct 3 2024, 8:11 AM
Subscribers

Details

Summary

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

Test Plan

cd /usr/tests/sys/posixshm && kyua test

I did not actually test with a real MAC module.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jilles retitled this revision from to posixshm: Fix lock leak when mac_posixshm_check_read rejects read..
jilles updated this object.
jilles edited the test plan for this revision. (Show Details)
jilles added reviewers: kib, rwatson.
kib edited edge metadata.
This revision is now accepted and ready to land.Jun 23 2016, 6:31 AM
rwatson edited edge metadata.

This change seems sensible to me, but I believe John has worked with this code most recently, so I've added him as a reviewer as well.

jhb edited edge metadata.

The read bits are Konstantin's code, so his review counts for more weight than mine. This looks good to me though.

This revision was automatically updated to reflect the committed changes.