Skip to content

Commit 88c3f7a

Browse files
Richard KnutssonJames Morris
authored andcommitted
Security: remove security_file_mmap hook sparse-warnings (NULL as 0).
Fixing: CHECK mm/mmap.c mm/mmap.c:1623:29: warning: Using plain integer as NULL pointer mm/mmap.c:1623:29: warning: Using plain integer as NULL pointer mm/mmap.c:1944:29: warning: Using plain integer as NULL pointer Signed-off-by: Richard Knutsson <[email protected]> Signed-off-by: James Morris <[email protected]>
1 parent c9180a5 commit 88c3f7a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mm/mmap.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1620,7 +1620,7 @@ static inline int expand_downwards(struct vm_area_struct *vma,
16201620
return -ENOMEM;
16211621

16221622
address &= PAGE_MASK;
1623-
error = security_file_mmap(0, 0, 0, 0, address, 1);
1623+
error = security_file_mmap(NULL, 0, 0, 0, address, 1);
16241624
if (error)
16251625
return error;
16261626

@@ -1941,7 +1941,7 @@ unsigned long do_brk(unsigned long addr, unsigned long len)
19411941
if (is_hugepage_only_range(mm, addr, len))
19421942
return -EINVAL;
19431943

1944-
error = security_file_mmap(0, 0, 0, 0, addr, 1);
1944+
error = security_file_mmap(NULL, 0, 0, 0, addr, 1);
19451945
if (error)
19461946
return error;
19471947

0 commit comments

Comments
 (0)