提交 348dc288 编写于 作者: V Vishal Goel 提交者: Casey Schaufler

Smack: Traverse the smack_known_list using list_for_each_entry_rcu macro

In smack_from_secattr function,"smack_known_list" is being traversed
using list_for_each_entry macro, although it is a rcu protected
structure. So it should be traversed using "list_for_each_entry_rcu"
macro to fetch the rcu protected entry.
Signed-off-by: NVishal Goel <vishal.goel@samsung.com>
Signed-off-by: NHimanshu Shukla <himanshu.sh@samsung.com>
Signed-off-by: NCasey Schaufler <casey@schaufler-ca.com>
上级 3d4f673a
......@@ -3900,7 +3900,7 @@ static struct smack_known *smack_from_secattr(struct netlbl_lsm_secattr *sap,
* ambient value.
*/
rcu_read_lock();
list_for_each_entry(skp, &smack_known_list, list) {
list_for_each_entry_rcu(skp, &smack_known_list, list) {
if (sap->attr.mls.lvl != skp->smk_netlabel.attr.mls.lvl)
continue;
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册