Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 2e962e2f authored by Vishal Goel's avatar Vishal Goel Committed by Casey Schaufler
Browse files

SMACK: Add new lock for adding entry in smack master list



"smk_set_access()" function adds a new rule entry in subject label specific
list(rule_list) and in global rule list(smack_rule_list) both. Mutex lock
(rule_lock) is used to avoid simultaneous updates. But this lock is subject
label specific lock. If 2 processes tries to add different rules(i.e with
different subject labels) simultaneously, then both the processes can take
the "rule_lock" respectively. So it will cause a problem while adding
entries in master rule list.
Now a new mutex lock(smack_master_list_lock) has been taken to add entry in
smack_rule_list to avoid simultaneous updates of different rules.

Signed-off-by: default avatarVishal Goel <vishal.goel@samsung.com>
Signed-off-by: default avatarHimanshu Shukla <himanshu.sh@samsung.com>
Signed-off-by: default avatarCasey Schaufler <casey@schaufler-ca.com>
parent 0c96d1f5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment