Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

lsm: rename exists_ordered_lsm() to lsm_order_exists()

Also add a header comment block to the function.

Reviewed-by: Casey Schaufler <casey@schaufler-ca.com>
Reviewed-by: John Johansen <john.johhansen@canonical.com>
Reviewed-by: Mimi Zohar <zohar@linux.ibm.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>

+8 -5
+8 -5
security/lsm_init.c
··· 108 108 return (lsm->enabled ? *lsm->enabled : false); 109 109 } 110 110 111 - /* Is an LSM already listed in the ordered LSMs list? */ 112 - static bool __init exists_ordered_lsm(struct lsm_info *lsm) 111 + /** 112 + * lsm_order_exists - Determine if a LSM exists in the ordered list 113 + * @lsm: LSM definition 114 + */ 115 + static bool __init lsm_order_exists(struct lsm_info *lsm) 113 116 { 114 117 struct lsm_info **check; 115 118 ··· 129 126 static void __init append_ordered_lsm(struct lsm_info *lsm, const char *from) 130 127 { 131 128 /* Ignore duplicate selections. */ 132 - if (exists_ordered_lsm(lsm)) 129 + if (lsm_order_exists(lsm)) 133 130 return; 134 131 135 132 if (WARN(last_lsm == MAX_LSM_COUNT, "%s: out of LSM static calls!?\n", from)) ··· 272 269 /* Process "security=", if given. */ 273 270 if (lsm_order_legacy) { 274 271 lsm_for_each_raw(lsm) { 275 - if (exists_ordered_lsm(lsm)) 272 + if (lsm_order_exists(lsm)) 276 273 continue; 277 274 if (strcmp(lsm->id->name, lsm_order_legacy) == 0) 278 275 append_ordered_lsm(lsm, "security="); ··· 287 284 288 285 /* Disable all LSMs not in the ordered list. */ 289 286 lsm_for_each_raw(lsm) { 290 - if (exists_ordered_lsm(lsm)) 287 + if (lsm_order_exists(lsm)) 291 288 continue; 292 289 lsm_enabled_set(lsm, false); 293 290 init_debug("%s skipped: %s (not in requested order)\n",