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

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

SMACK: Add the rcu synchronization mechanism in ipv6 hooks



Add the rcu synchronization mechanism for accessing smk_ipv6_port_list
in smack IPv6 hooks. Access to the port list is vulnerable to a race
condition issue,it does not apply proper synchronization methods while
working on critical section. It is possible that when one thread is
reading the list, at the same time another thread is modifying the
same port list, which can cause the major problems.

To ensure proper synchronization between two threads, rcu mechanism
has been applied while accessing and modifying the port list. RCU will
also not affect the performance, as there are more accesses than
modification where RCU is most effective synchronization mechanism.

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 916cafdc
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