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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 16 Feb 2020 18:57:49 -0800
From:   Randy Dunlap <rdunlap@...radead.org>
To:     Mina Almasry <almasrymina@...gle.com>
Cc:     linux-mm@...ck.org, linux-next@...r.kernel.org,
        open list <linux-kernel@...r.kernel.org>,
        David Rientjes <rientjes@...gle.com>,
        Greg Thelen <gthelen@...gle.com>,
        Mike Kravetz <mike.kravetz@...cle.com>,
        Shakeel Butt <shakeelb@...gle.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Stephen Rothwell <sfr@...b.auug.org.au>
Subject: [PATCH] hugetlb: fix <linux/hugetlb_cgroup.h> structs

On 2/16/20 6:48 PM, Randy Dunlap wrote:
> On 2/16/20 1:03 PM, Mina Almasry wrote:
>> On Sun, Feb 16, 2020 at 12:40 PM Mina Almasry <almasrymina@...gle.com> wrote:
>>>

>> any insight into why I can't reproduce the
>> warning? Wrong tree perhaps?
>>
>> I suspect a forward declaration of struct resv_map and struct
>> file_region in hugetlb_cgroup.h would also fix.

Yes, adding struct stubs in that header file does remove the
build warnings.

thanks.

=== patch follows ===

From: Randy Dunlap <rdunlap@...radead.org>

Fix build warnings when CONFIG_HUGETLB is not set/enabled.
Fixes these warnings:

In file included from ../mm/migrate.c:39:0:
../include/linux/hugetlb_cgroup.h:147:21: warning: ‘struct file_region’ declared inside parameter list will not be visible outside of this definition or declaration
              struct file_region *rg,
                     ^~~~~~~~~~~
../include/linux/hugetlb_cgroup.h:146:63: warning: ‘struct resv_map’ declared inside parameter list will not be visible outside of this definition or declaration
 static inline void hugetlb_cgroup_uncharge_file_region(struct resv_map *resv,
                                                               ^~~~~~~~
../include/linux/hugetlb_cgroup.h:234:59: warning: ‘struct resv_map’ declared inside parameter list will not be visible outside of this definition or declaration
 static inline void hugetlb_cgroup_uncharge_counter(struct resv_map *resv,
                                                           ^~~~~~~~

Suggested-by: Mina Almasry <almasrymina@...gle.com>
Signed-off-by: Randy Dunlap <rdunlap@...radead.org>
---
 include/linux/hugetlb_cgroup.h |    3 +++
 1 file changed, 3 insertions(+)

--- mmotm-2020-0213-2226.orig/include/linux/hugetlb_cgroup.h
+++ mmotm-2020-0213-2226/include/linux/hugetlb_cgroup.h
@@ -18,6 +18,9 @@
 #include <linux/mmdebug.h>
 
 struct hugetlb_cgroup;
+struct file_region;
+struct resv_map;
+
 /*
  * Minimum page order trackable by hugetlb cgroup.
  * At least 4 pages are necessary for all the tracking information.

Powered by blists - more mailing lists