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)
Feb 25 2024, 10:55 AM
Unknown Object (File)
Jan 10 2024, 6:04 PM
Unknown Object (File)
Jan 10 2024, 6:03 PM
Unknown Object (File)
Jan 10 2024, 6:03 PM
Unknown Object (File)
Jan 10 2024, 5:52 PM
Unknown Object (File)
Dec 22 2023, 9:57 PM
Unknown Object (File)
Aug 31 2023, 12:58 PM
Unknown Object (File)
Aug 1 2023, 7:05 PM
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.