Commit 6034f7e603cd2dae8ed9a1d8d2ccfeb6b5c48d73
Committed by
Paul E. McKenney
1 parent
b119cbab3a
Exists in
master
and in
20 other branches
security,rcu: Convert call_rcu(whitelist_item_free) to kfree_rcu()
The rcu callback whitelist_item_free() just calls a kfree(), so we use kfree_rcu() instead of the call_rcu(whitelist_item_free). Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Acked-by: James Morris <jmorris@namei.org> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Showing 1 changed file with 1 additions and 9 deletions Side-by-side Diff
security/device_cgroup.c
... | ... | @@ -125,14 +125,6 @@ |
125 | 125 | return 0; |
126 | 126 | } |
127 | 127 | |
128 | -static void whitelist_item_free(struct rcu_head *rcu) | |
129 | -{ | |
130 | - struct dev_whitelist_item *item; | |
131 | - | |
132 | - item = container_of(rcu, struct dev_whitelist_item, rcu); | |
133 | - kfree(item); | |
134 | -} | |
135 | - | |
136 | 128 | /* |
137 | 129 | * called under devcgroup_mutex |
138 | 130 | */ |
... | ... | @@ -155,7 +147,7 @@ |
155 | 147 | walk->access &= ~wh->access; |
156 | 148 | if (!walk->access) { |
157 | 149 | list_del_rcu(&walk->list); |
158 | - call_rcu(&walk->rcu, whitelist_item_free); | |
150 | + kfree_rcu(walk, rcu); | |
159 | 151 | } |
160 | 152 | } |
161 | 153 | } |