Commit 88c3f7a8 authored by Richard Knutsson's avatar Richard Knutsson Committed by James Morris

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: default avatarRichard Knutsson <ricknu-0@student.ltu.se>
Signed-off-by: default avatarJames Morris <jmorris@namei.org>
parent c9180a57
...@@ -1620,7 +1620,7 @@ static inline int expand_downwards(struct vm_area_struct *vma, ...@@ -1620,7 +1620,7 @@ static inline int expand_downwards(struct vm_area_struct *vma,
return -ENOMEM; return -ENOMEM;
address &= PAGE_MASK; address &= PAGE_MASK;
error = security_file_mmap(0, 0, 0, 0, address, 1); error = security_file_mmap(NULL, 0, 0, 0, address, 1);
if (error) if (error)
return error; return error;
...@@ -1941,7 +1941,7 @@ unsigned long do_brk(unsigned long addr, unsigned long len) ...@@ -1941,7 +1941,7 @@ unsigned long do_brk(unsigned long addr, unsigned long len)
if (is_hugepage_only_range(mm, addr, len)) if (is_hugepage_only_range(mm, addr, len))
return -EINVAL; return -EINVAL;
error = security_file_mmap(0, 0, 0, 0, addr, 1); error = security_file_mmap(NULL, 0, 0, 0, addr, 1);
if (error) if (error)
return error; return error;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment