Skip to content

Commit

Permalink
LSM: Make some functions static
Browse files Browse the repository at this point in the history
Fixes the following sparse warnings:

security/security.c:533:5: warning:
 symbol 'lsm_task_alloc' was not declared. Should it be static?
security/security.c:554:5: warning:
 symbol 'lsm_ipc_alloc' was not declared. Should it be static?
security/security.c:575:5: warning:
 symbol 'lsm_msg_msg_alloc' was not declared. Should it be static?

Fixes: f4ad8f2 ("LSM: Infrastructure management of the task security")
Signed-off-by: Wei Yongjun <[email protected]>
Acked-by: Casey Schaufler <[email protected]>
Signed-off-by: James Morris <[email protected]>
  • Loading branch information
Wei Yongjun authored and James Morris committed Jan 18, 2019
1 parent 1cfb2a5 commit 3e8c736
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions security/security.c
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ int lsm_inode_alloc(struct inode *inode)
*
* Returns 0, or -ENOMEM if memory can't be allocated.
*/
int lsm_task_alloc(struct task_struct *task)
static int lsm_task_alloc(struct task_struct *task)
{
if (blob_sizes.lbs_task == 0) {
task->security = NULL;
Expand All @@ -551,7 +551,7 @@ int lsm_task_alloc(struct task_struct *task)
*
* Returns 0, or -ENOMEM if memory can't be allocated.
*/
int lsm_ipc_alloc(struct kern_ipc_perm *kip)
static int lsm_ipc_alloc(struct kern_ipc_perm *kip)
{
if (blob_sizes.lbs_ipc == 0) {
kip->security = NULL;
Expand All @@ -572,7 +572,7 @@ int lsm_ipc_alloc(struct kern_ipc_perm *kip)
*
* Returns 0, or -ENOMEM if memory can't be allocated.
*/
int lsm_msg_msg_alloc(struct msg_msg *mp)
static int lsm_msg_msg_alloc(struct msg_msg *mp)
{
if (blob_sizes.lbs_msg_msg == 0) {
mp->security = NULL;
Expand Down

0 comments on commit 3e8c736

Please sign in to comment.