Skip to content

Commit b57d020

Browse files
committed
Smack: fix W=1 build warnings
A couple of functions had malformed comment blocks. Namespace parameters were added without updating the comment blocks. These are all repaired in the Smack code, so "% make W=1 security/smack" is warning free. Signed-off-by: Casey Schaufler <[email protected]>
1 parent f8de49e commit b57d020

File tree

1 file changed

+18
-12
lines changed

1 file changed

+18
-12
lines changed

security/smack/smack_lsm.c

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ static int smk_copy_relabel(struct list_head *nhead, struct list_head *ohead,
391391

392392
/**
393393
* smk_ptrace_mode - helper function for converting PTRACE_MODE_* into MAY_*
394-
* @mode - input mode in form of PTRACE_MODE_*
394+
* @mode: input mode in form of PTRACE_MODE_*
395395
*
396396
* Returns a converted MAY_* mode usable by smack rules
397397
*/
@@ -1215,6 +1215,7 @@ static int smack_inode_getattr(const struct path *path)
12151215

12161216
/**
12171217
* smack_inode_setxattr - Smack check for setting xattrs
1218+
* @mnt_userns: active user namespace
12181219
* @dentry: the object
12191220
* @name: name of the attribute
12201221
* @value: value of the attribute
@@ -1341,6 +1342,7 @@ static int smack_inode_getxattr(struct dentry *dentry, const char *name)
13411342

13421343
/**
13431344
* smack_inode_removexattr - Smack check on removexattr
1345+
* @mnt_userns: active user namespace
13441346
* @dentry: the object
13451347
* @name: name of the attribute
13461348
*
@@ -1400,6 +1402,7 @@ static int smack_inode_removexattr(struct user_namespace *mnt_userns,
14001402

14011403
/**
14021404
* smack_inode_getsecurity - get smack xattrs
1405+
* @mnt_userns: active user namespace
14031406
* @inode: the object
14041407
* @name: attribute name
14051408
* @buffer: where to put the result
@@ -1621,13 +1624,14 @@ static int smack_file_fcntl(struct file *file, unsigned int cmd,
16211624
}
16221625

16231626
/**
1624-
* smack_mmap_file :
1625-
* Check permissions for a mmap operation. The @file may be NULL, e.g.
1626-
* if mapping anonymous memory.
1627-
* @file contains the file structure for file to map (may be NULL).
1628-
* @reqprot contains the protection requested by the application.
1629-
* @prot contains the protection that will be applied by the kernel.
1630-
* @flags contains the operational flags.
1627+
* smack_mmap_file - Check permissions for a mmap operation.
1628+
* @file: contains the file structure for file to map (may be NULL).
1629+
* @reqprot: contains the protection requested by the application.
1630+
* @prot: contains the protection that will be applied by the kernel.
1631+
* @flags: contains the operational flags.
1632+
*
1633+
* The @file may be NULL, e.g. if mapping anonymous memory.
1634+
*
16311635
* Return 0 if permission is granted.
16321636
*/
16331637
static int smack_mmap_file(struct file *file,
@@ -3054,7 +3058,7 @@ static int smack_sem_associate(struct kern_ipc_perm *isp, int semflg)
30543058
}
30553059

30563060
/**
3057-
* smack_sem_shmctl - Smack access check for sem
3061+
* smack_sem_semctl - Smack access check for sem
30583062
* @isp: the object
30593063
* @cmd: what it wants to do
30603064
*
@@ -3200,7 +3204,7 @@ static int smack_msg_queue_msgsnd(struct kern_ipc_perm *isp, struct msg_msg *msg
32003204
}
32013205

32023206
/**
3203-
* smack_msg_queue_msgsnd - Smack access check for msg_queue
3207+
* smack_msg_queue_msgrcv - Smack access check for msg_queue
32043208
* @isp: the object
32053209
* @msg: unused
32063210
* @target: unused
@@ -3209,8 +3213,10 @@ static int smack_msg_queue_msgsnd(struct kern_ipc_perm *isp, struct msg_msg *msg
32093213
*
32103214
* Returns 0 if current has read and write access, error code otherwise
32113215
*/
3212-
static int smack_msg_queue_msgrcv(struct kern_ipc_perm *isp, struct msg_msg *msg,
3213-
struct task_struct *target, long type, int mode)
3216+
static int smack_msg_queue_msgrcv(struct kern_ipc_perm *isp,
3217+
struct msg_msg *msg,
3218+
struct task_struct *target, long type,
3219+
int mode)
32143220
{
32153221
return smk_curacc_msq(isp, MAY_READWRITE);
32163222
}

0 commit comments

Comments
 (0)