Skip to content

Commit 531bf6a

Browse files
robertosassumimizohar
authored andcommitted
ima: Pass NULL instead of 0 to ima_get_action() in ima_file_mprotect()
This patch fixes the sparse warning: sparse: warning: Using plain integer as NULL pointer Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com> Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
1 parent 8c55941 commit 531bf6a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

security/integrity/ima/ima_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ int ima_file_mprotect(struct vm_area_struct *vma, unsigned long prot)
433433
inode = file_inode(vma->vm_file);
434434
action = ima_get_action(file_mnt_user_ns(vma->vm_file), inode,
435435
current_cred(), secid, MAY_EXEC, MMAP_CHECK,
436-
&pcr, &template, 0);
436+
&pcr, &template, NULL);
437437

438438
/* Is the mmap'ed file in policy? */
439439
if (!(action & (IMA_MEASURE | IMA_APPRAISE_SUBMASK)))

0 commit comments

Comments
 (0)