Bug 197704 - investigate useage of sem in inode_security_set_sid
investigate useage of sem in inode_security_set_sid
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Eric Paris
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2006-07-05 12:58 EDT by Eric Paris
Modified: 2007-11-30 17:11 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-09-25 16:45:44 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Eric Paris 2006-07-05 12:58:18 EDT
eliminate the holding of the sem in inode_security_set_sid if it is indeed not
Comment 1 Stephen Smalley 2006-07-05 13:07:29 EDT
Rationale:  isec->sem is used to synchronize inode security setup, but this is
only necessary when multiple threads may access the inode, as in
inode_doinit_with_dentry (upon lookup).  inode_security_set_sid is now only used
by inode_init_security (and could be folded into it), which is called to set up
newly created inodes before they are accessible.  I think that the taking of
isem there is legacy code. Note that taking the sem also does no good there, as
if you have multiple threads accessing the inode there, someone is going to lose
and have his value clobbered.

We should also look at converting the remaining semaphores in the SELinux code
to simple mutexes.
Comment 2 Eric Paris 2006-07-20 13:12:49 EDT
"We should also look at converting the remaining semaphores in the SELinux code
to simple mutexes."

By simpe mutexes do you mean spin locks?  Does the kernel have another locking
mechanism that would work other than spin locks and semaphores initialized to 1?
Comment 4 Eric Paris 2006-08-25 11:13:03 EDT
Posted upstream and in -mm
Comment 5 Eric Paris 2006-09-25 16:45:44 EDT
Closing current release (in 2.6.18)

Note You need to log in before you can comment on or make changes to this bug.