Commit 88c3f7a8f2c86be264d326cf6f49a3e8c30d13a6
Committed by
James Morris
1 parent
c9180a57a9
Exists in
master
and in
4 other branches
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>
Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff
mm/mmap.c
... | ... | @@ -1620,7 +1620,7 @@ |
1620 | 1620 | return -ENOMEM; |
1621 | 1621 | |
1622 | 1622 | 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); | |
1624 | 1624 | if (error) |
1625 | 1625 | return error; |
1626 | 1626 | |
... | ... | @@ -1941,7 +1941,7 @@ |
1941 | 1941 | if (is_hugepage_only_range(mm, addr, len)) |
1942 | 1942 | return -EINVAL; |
1943 | 1943 | |
1944 | - error = security_file_mmap(0, 0, 0, 0, addr, 1); | |
1944 | + error = security_file_mmap(NULL, 0, 0, 0, addr, 1); | |
1945 | 1945 | if (error) |
1946 | 1946 | return error; |
1947 | 1947 |