smack-team/smack — pull request #17 by jsakkine (2013-12-03 16:02:33+00:00)
Title: SmackFS availability enhancement

As you know I reverted Rafals commit 6c1d15b1 because it leaked new API even thought it fixed an availability bug.
It's an error condition for an application using SMACK kernel functionality if smackfs is not properly mounted.

There are two issues in the current code:

* smack_mnt is validated in the initialization. Full traversal through mount point would be an overkill but check that it is still valid might make sense.
* SmackFS could get unmounted after check is done. Therefore file descriptor must be kept open through life-cycle of one function call.

Changes:

- @jsakkine: updated description based on discussion. I think it is safe to assume that smackfs should be mounted while processes using SMACK kernel functionality after considering this for a while. It's part of their run-time environment.