Skip to content

Commit 4507053

Browse files
committed
lsm: add/tweak function header comment blocks in lsm_init.c
Add function header comments for lsm_static_call_init() and early_security_init(), tweak the existing comment block for security_add_hooks(). Reviewed-by: Casey Schaufler <casey@schaufler-ca.com> Reviewed-by: John Johansen <john.johhansen@canonical.com> Signed-off-by: Paul Moore <paul@paul-moore.com>
1 parent 45a41d1 commit 4507053

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

security/lsm_init.c

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,10 @@ static void __init lsm_order_parse(const char *list, const char *src)
315315
}
316316
}
317317

318+
/**
319+
* lsm_static_call_init - Initialize a LSM's static calls
320+
* @hl: LSM hook list
321+
*/
318322
static void __init lsm_static_call_init(struct security_hook_list *hl)
319323
{
320324
struct lsm_static_call *scall = hl->scalls;
@@ -335,12 +339,12 @@ static void __init lsm_static_call_init(struct security_hook_list *hl)
335339
}
336340

337341
/**
338-
* security_add_hooks - Add a modules hooks to the hook lists.
339-
* @hooks: the hooks to add
340-
* @count: the number of hooks to add
341-
* @lsmid: the identification information for the security module
342+
* security_add_hooks - Add a LSM's hooks to the LSM framework's hook lists
343+
* @hooks: LSM hooks to add
344+
* @count: number of hooks to add
345+
* @lsmid: identification information for the LSM
342346
*
343-
* Each LSM has to register its hooks with the infrastructure.
347+
* Each LSM has to register its hooks with the LSM framework.
344348
*/
345349
void __init security_add_hooks(struct security_hook_list *hooks, int count,
346350
const struct lsm_id *lsmid)
@@ -353,6 +357,9 @@ void __init security_add_hooks(struct security_hook_list *hooks, int count,
353357
}
354358
}
355359

360+
/**
361+
* early_security_init - Initialize the early LSMs
362+
*/
356363
int __init early_security_init(void)
357364
{
358365
struct lsm_info *lsm;

0 commit comments

Comments
 (0)