1
Rename put_aa_profile to aa_put_profile for consistency.
3
Index: b/security/apparmor/apparmorfs.c
4
===================================================================
5
--- a/security/apparmor/apparmorfs.c
6
+++ b/security/apparmor/apparmorfs.c
7
@@ -170,7 +170,7 @@ static char *aa_simple_write_to_buffer(c
8
"profile %s active %s)\n",
9
msg, current->comm, current->pid,
10
BASE_PROFILE(profile)->name, profile->name);
11
- put_aa_profile(profile);
12
+ aa_put_profile(profile);
14
data = ERR_PTR(-EPERM);
16
Index: b/security/apparmor/inline.h
17
===================================================================
18
--- a/security/apparmor/inline.h
19
+++ b/security/apparmor/inline.h
20
@@ -25,10 +25,10 @@ static inline struct aa_profile *aa_dup_
24
- * put_aa_profile - decrement refcount on profile @p
25
+ * aa_put_profile - decrement refcount on profile @p
28
-static inline void put_aa_profile(struct aa_profile *p)
29
+static inline void aa_put_profile(struct aa_profile *p)
32
kref_put(&BASE_PROFILE(p)->count, free_aa_profile_kref);
33
@@ -72,7 +72,7 @@ static inline void aa_switch_to_profile(
34
cxt->caps_logged = CAP_EMPTY_SET;
35
cxt->hat_magic = hat_magic;
36
rcu_assign_pointer(cxt->profile, aa_dup_profile(newactive));
37
- put_aa_profile(old);
38
+ aa_put_profile(old);
42
Index: b/security/apparmor/list.c
43
===================================================================
44
--- a/security/apparmor/list.c
45
+++ b/security/apparmor/list.c
46
@@ -60,7 +60,7 @@ int aa_profilelist_add(struct aa_profile
47
write_lock(&profile_lock);
48
old_profile = __aa_find_profile(profile->name, &profile_list);
50
- put_aa_profile(old_profile);
51
+ aa_put_profile(old_profile);
55
@@ -126,7 +126,7 @@ struct aa_profile *aa_profilelist_replac
56
oldprofile->isstale = 1;
58
/* __aa_find_profile incremented count, so adjust down */
59
- put_aa_profile(oldprofile);
60
+ aa_put_profile(oldprofile);
63
list_add(&profile->list, &profile_list);
64
@@ -145,7 +145,7 @@ void aa_profilelist_release(void)
65
write_lock(&profile_lock);
66
list_for_each_entry_safe(p, tmp, &profile_list, list) {
67
list_del_init(&p->list);
71
write_unlock(&profile_lock);
73
Index: b/security/apparmor/lsm.c
74
===================================================================
75
--- a/security/apparmor/lsm.c
76
+++ b/security/apparmor/lsm.c
77
@@ -92,7 +92,7 @@ static int aa_reject_syscall(struct task
80
error = aa_audit_syscallreject(profile, flags, name);
81
- put_aa_profile(profile);
82
+ aa_put_profile(profile);
86
@@ -148,7 +148,7 @@ static int apparmor_capable(struct task_
88
error = aa_capability(profile, cap);
90
- put_aa_profile(profile);
91
+ aa_put_profile(profile);
95
@@ -233,7 +233,7 @@ static int apparmor_inode_mkdir(struct i
97
error = aa_perm_dir(profile, dentry, mnt, "mkdir", MAY_WRITE);
99
- put_aa_profile(profile);
100
+ aa_put_profile(profile);
104
@@ -253,7 +253,7 @@ static int apparmor_inode_rmdir(struct i
106
error = aa_perm_dir(profile, dentry, mnt, "rmdir", MAY_WRITE);
108
- put_aa_profile(profile);
109
+ aa_put_profile(profile);
113
@@ -269,7 +269,7 @@ static int aa_permission(struct inode *i
116
error = aa_perm(profile, dentry, mnt, mask, leaf);
117
- put_aa_profile(profile);
118
+ aa_put_profile(profile);
122
@@ -297,7 +297,7 @@ static int apparmor_inode_link(struct de
123
error = aa_link(profile, new_dentry, new_mnt,
124
old_dentry, old_mnt);
126
- put_aa_profile(profile);
127
+ aa_put_profile(profile);
131
@@ -347,7 +347,7 @@ static int apparmor_inode_rename(struct
135
- put_aa_profile(profile);
136
+ aa_put_profile(profile);
140
@@ -395,7 +395,7 @@ static int apparmor_inode_setattr(struct
142
error = aa_attr(profile, dentry, mnt, iattr);
144
- put_aa_profile(profile);
145
+ aa_put_profile(profile);
149
@@ -414,7 +414,7 @@ static int aa_xattr_permission(struct de
151
error = aa_perm_xattr(profile, dentry, mnt, name,
153
- put_aa_profile(profile);
154
+ aa_put_profile(profile);
158
@@ -522,7 +522,7 @@ static int apparmor_getprocattr(struct t
160
profile = aa_get_profile(p);
161
error = aa_getprocattr(profile, str, size);
162
- put_aa_profile(profile);
163
+ aa_put_profile(profile);
167
@@ -614,7 +614,7 @@ static int apparmor_setprocattr(struct t
171
- put_aa_profile(profile);
172
+ aa_put_profile(profile);
174
/* unknown operation */
175
AA_WARN("%s: Unknown setprocattr command '%.*s' by task %s(%d) "
176
Index: b/security/apparmor/main.c
177
===================================================================
178
--- a/security/apparmor/main.c
179
+++ b/security/apparmor/main.c
180
@@ -258,7 +258,7 @@ fail:
182
void free_null_complain_profile(void)
184
- put_aa_profile(null_complain_profile);
185
+ aa_put_profile(null_complain_profile);
186
null_complain_profile = NULL;
189
@@ -1011,7 +1011,7 @@ apply_profile:
190
WARN_ON(newprofile == null_complain_profile);
192
/* drop refcnt obtained from earlier aa_dup_profile */
193
- put_aa_profile(newprofile);
194
+ aa_put_profile(newprofile);
196
newprofile = aa_profilelist_find(filename);
198
@@ -1042,7 +1042,7 @@ apply_profile:
201
aa_switch_to_profile(cxt, newprofile, 0);
202
- put_aa_profile(newprofile);
203
+ aa_put_profile(newprofile);
205
if (complain && newprofile == null_complain_profile)
206
LOG_HINT(newprofile, GFP_ATOMIC, HINT_CHGPROF,
207
@@ -1055,7 +1055,7 @@ apply_profile:
209
aa_put_name(filename);
211
- put_aa_profile(profile);
212
+ aa_put_profile(profile);
216
@@ -1110,7 +1110,7 @@ static inline int do_change_hat(const ch
219
aa_switch_to_profile(cxt, sub, hat_magic);
220
- put_aa_profile(sub);
221
+ aa_put_profile(sub);
223
/* There is no such subprofile change to a NULL profile.
224
* The NULL profile grants no file access.
225
Index: b/security/apparmor/module_interface.c
226
===================================================================
227
--- a/security/apparmor/module_interface.c
228
+++ b/security/apparmor/module_interface.c
229
@@ -113,7 +113,7 @@ static inline void task_replace(struct a
230
nactive = aa_dup_profile(new->null_profile);
232
aa_switch_to_profile(cxt, nactive, cxt->hat_magic);
233
- put_aa_profile(nactive);
234
+ aa_put_profile(nactive);
236
aa_switch_to_profile(cxt, new, cxt->hat_magic);
238
@@ -508,7 +508,7 @@ ssize_t aa_file_prof_add(void *data, siz
240
AA_WARN("trying to add profile (%s) that already exists.\n",
242
- put_aa_profile(profile);
243
+ aa_put_profile(profile);
247
@@ -572,11 +572,11 @@ ssize_t aa_file_prof_repl(void *udata, s
248
aa_task_context_list_iterate(taskreplace_iter, (void *)&data);
250
/* it's off global list, and we are done replacing */
251
- put_aa_profile(data.old_profile);
252
+ aa_put_profile(data.old_profile);
255
/* release extra reference obtained above (race) */
256
- put_aa_profile(data.new_profile);
257
+ aa_put_profile(data.new_profile);
261
@@ -607,7 +607,7 @@ ssize_t aa_file_prof_remove(const char *
262
(void *)old_profile);
264
/* drop reference obtained by aa_profilelist_remove */
265
- put_aa_profile(old_profile);
266
+ aa_put_profile(old_profile);
268
AA_WARN("%s: trying to remove profile (%s) that "
269
"doesn't exist - skipping.\n", __FUNCTION__, name);
270
@@ -618,7 +618,7 @@ ssize_t aa_file_prof_remove(const char *
274
- * free_aa_profile_kref - free aa_profile by kref (called by put_aa_profile)
275
+ * free_aa_profile_kref - free aa_profile by kref (called by aa_put_profile)
276
* @kr: kref callback for freeing of a profile
278
void free_aa_profile_kref(struct kref *kr)
279
@@ -657,7 +657,7 @@ void free_aa_profile(struct aa_profile *
281
aa_match_free(profile->file_rules);
283
- /* use free_aa_profile instead of put_aa_profile to destroy the
284
+ /* use free_aa_profile instead of aa_put_profile to destroy the
285
* null_profile, because the null_profile use the same reference
286
* counting as hats, ie. the count goes to the base profile.
288
@@ -665,7 +665,7 @@ void free_aa_profile(struct aa_profile *
289
list_for_each_entry_safe(p, ptmp, &profile->sub, list) {
290
list_del_init(&p->list);
297
Index: b/security/apparmor/procattr.c
298
===================================================================
299
--- a/security/apparmor/procattr.c
300
+++ b/security/apparmor/procattr.c
301
@@ -262,7 +262,7 @@ int aa_setprocattr_setprofile(struct tas
305
- put_aa_profile(profile);
306
+ aa_put_profile(profile);
310
@@ -282,7 +282,7 @@ int aa_setprocattr_setprofile(struct tas
311
WARN_ON(profile == null_complain_profile);
313
/* drop refcnt obtained from earlier aa_dup_profile */
314
- put_aa_profile(profile);
315
+ aa_put_profile(profile);
316
profile = aa_profilelist_find(name);
319
@@ -309,7 +309,7 @@ int aa_setprocattr_setprofile(struct tas
322
aa_switch_to_profile(cxt, profile, 0);
323
- put_aa_profile(profile);
324
+ aa_put_profile(profile);
327
spin_unlock_irqrestore(&cxt_lock, flags);