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 <ricknu-0@student.ltu.se>
Signed-off-by: James Morris <jmorris@namei.org>
diff --git a/mm/mmap.c b/mm/mmap.c
index 15678aa..bfa389f 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -1620,7 +1620,7 @@
return -ENOMEM;
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)
return error;
@@ -1941,7 +1941,7 @@
if (is_hugepage_only_range(mm, addr, len))
return -EINVAL;
- error = security_file_mmap(0, 0, 0, 0, addr, 1);
+ error = security_file_mmap(NULL, 0, 0, 0, addr, 1);
if (error)
return error;