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>
This commit is contained in:
Roberto Sassu 2021-06-08 14:31:24 +02:00 коммит произвёл Mimi Zohar
Родитель 8c559415f6
Коммит 531bf6a88d
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -433,7 +433,7 @@ int ima_file_mprotect(struct vm_area_struct *vma, unsigned long prot)
inode = file_inode(vma->vm_file); inode = file_inode(vma->vm_file);
action = ima_get_action(file_mnt_user_ns(vma->vm_file), inode, action = ima_get_action(file_mnt_user_ns(vma->vm_file), inode,
current_cred(), secid, MAY_EXEC, MMAP_CHECK, current_cred(), secid, MAY_EXEC, MMAP_CHECK,
&pcr, &template, 0); &pcr, &template, NULL);
/* Is the mmap'ed file in policy? */ /* Is the mmap'ed file in policy? */
if (!(action & (IMA_MEASURE | IMA_APPRAISE_SUBMASK))) if (!(action & (IMA_MEASURE | IMA_APPRAISE_SUBMASK)))