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: <20191022125124.32812-1-yuehaibing@huawei.com>
Date:   Tue, 22 Oct 2019 20:51:24 +0800
From:   YueHaibing <yuehaibing@...wei.com>
To:     <sfr@...b.auug.org.au>, <khlebnikov@...dex-team.ru>,
        <akpm@...ux-foundation.org>, <mhocko@...e.com>,
        <hannes@...xchg.org>, <vbabka@...e.cz>, <yuehaibing@...wei.com>,
        <jannh@...gle.com>, <gregkh@...uxfoundation.org>,
        <janne.huttunen@...ia.com>, <arunks@...eaurora.org>
CC:     <linux-mm@...ck.org>, <linux-kernel@...r.kernel.org>
Subject: [RFC PATCH -next] mm/vmstat: Fix build error without CONFIG_VM_EVENT_COUNTERS

If CONFIG_VM_EVENT_COUNTERS is n but CONFIG_MEMCG is y,
vmstat_text is not equal stat_items_size:

mm/vmstat.c: In function vmstat_start:
./include/linux/compiler.h:350:38: error: call to __compiletime_assert_1659 declared
 with attribute error: BUILD_BUG_ON failed: stat_items_size != ARRAY_SIZE(vmstat_text) * sizeof(unsigned long)
  _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)

Reported-by: Hulk Robot <hulkci@...wei.com>
Fixes: 2fdf561910a9 ("mm/memcontrol: use vmstat names for printing statistics")
Signed-off-by: YueHaibing <yuehaibing@...wei.com>
---
 mm/vmstat.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/mm/vmstat.c b/mm/vmstat.c
index b2fd344..a19ed6e 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -1655,8 +1655,6 @@ static void *vmstat_start(struct seq_file *m, loff_t *pos)
 	stat_items_size += sizeof(struct vm_event_state);
 #endif
 
-	BUILD_BUG_ON(stat_items_size !=
-		     ARRAY_SIZE(vmstat_text) * sizeof(unsigned long));
 	v = kmalloc(stat_items_size, GFP_KERNEL);
 	m->private = v;
 	if (!v)
-- 
2.7.4


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ