lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191016095111.29163-1-ben.dooks@codethink.co.uk>
Date:   Wed, 16 Oct 2019 10:51:11 +0100
From:   "Ben Dooks (Codethink)" <ben.dooks@...ethink.co.uk>
To:     linux-kernel@...ts.codethink.co.uk
Cc:     "Ben Dooks (Codethink)" <ben.dooks@...ethink.co.uk>,
        Mike Kravetz <mike.kravetz@...cle.com>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH] mm: huge_pte_offset() returns pte_t *, not integer

The huge_pte_offset() returns a pte_t *, not an integer
so when huge-tlb is off, the replacement inline macro
should return a pte_t * too.

This fixes the following sparse warning:

mm/page_vma_mapped.c:156:29: warning: Using plain integer as NULL pointer

Signed-off-by: Ben Dooks <ben.dooks@...ethink.co.uk>
---
Cc: Mike Kravetz <mike.kravetz@...cle.com>
Cc: linux-mm@...ck.org
Cc: linux-kernel@...r.kernel.org
---
 include/linux/hugetlb.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
index 53fc34f930d0..e42c76aa1577 100644
--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
@@ -185,7 +185,7 @@ static inline void hugetlb_show_meminfo(void)
 #define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) ({BUG(); 0; })
 #define hugetlb_mcopy_atomic_pte(dst_mm, dst_pte, dst_vma, dst_addr, \
 				src_addr, pagep)	({ BUG(); 0; })
-#define huge_pte_offset(mm, address, sz)	0
+#define huge_pte_offset(mm, address, sz)	(pte_t *)NULL
 
 static inline bool isolate_huge_page(struct page *page, struct list_head *list)
 {
-- 
2.23.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ