diff options
author | Lai Jiangshan <laijs@cn.fujitsu.com> | 2011-03-18 00:03:19 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2011-05-08 01:51:05 -0400 |
commit | 690273fc70e94a07d70044881e5e52926301bcd3 (patch) | |
tree | f72c7942fb91d74e9f18ab169c213a21f1b40505 /security | |
parent | b55071eb6011413af3b9c434ae77dea8832069c8 (diff) |
security,rcu: convert call_rcu(sel_netif_free) to kfree_rcu()
The rcu callback sel_netif_free() just calls a kfree(),
so we use kfree_rcu() instead of the call_rcu(sel_netif_free).
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Diffstat (limited to 'security')
-rw-r--r-- | security/selinux/netif.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/security/selinux/netif.c b/security/selinux/netif.c index d6095d63d831..58cc481c93d5 100644 --- a/security/selinux/netif.c +++ b/security/selinux/netif.c | |||
@@ -104,22 +104,6 @@ static int sel_netif_insert(struct sel_netif *netif) | |||
104 | } | 104 | } |
105 | 105 | ||
106 | /** | 106 | /** |
107 | * sel_netif_free - Frees an interface entry | ||
108 | * @p: the entry's RCU field | ||
109 | * | ||
110 | * Description: | ||
111 | * This function is designed to be used as a callback to the call_rcu() | ||
112 | * function so that memory allocated to a hash table interface entry can be | ||
113 | * released safely. | ||
114 | * | ||
115 | */ | ||
116 | static void sel_netif_free(struct rcu_head *p) | ||
117 | { | ||
118 | struct sel_netif *netif = container_of(p, struct sel_netif, rcu_head); | ||
119 | kfree(netif); | ||
120 | } | ||
121 | |||
122 | /** | ||
123 | * sel_netif_destroy - Remove an interface record from the table | 107 | * sel_netif_destroy - Remove an interface record from the table |
124 | * @netif: the existing interface record | 108 | * @netif: the existing interface record |
125 | * | 109 | * |
@@ -131,7 +115,7 @@ static void sel_netif_destroy(struct sel_netif *netif) | |||
131 | { | 115 | { |
132 | list_del_rcu(&netif->list); | 116 | list_del_rcu(&netif->list); |
133 | sel_netif_total--; | 117 | sel_netif_total--; |
134 | call_rcu(&netif->rcu_head, sel_netif_free); | 118 | kfree_rcu(netif, rcu_head); |
135 | } | 119 | } |
136 | 120 | ||
137 | /** | 121 | /** |