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-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 16 May 2016 16:23:33 +0200
From:	Michal Hocko <mhocko@...nel.org>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Arnd Bergmann <arnd@...db.de>, Hugh Dickins <hughd@...gle.com>,
	Vlastimil Babka <vbabka@...e.cz>,
	Christoph Lameter <cl@...ux.com>,
	Mel Gorman <mgorman@...hsingularity.net>,
	Joonsoo Kim <iamjoonsoo.kim@....com>, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: unhide vmstat_text definition for CONFIG_SMP

Andrew, I think that the following is more straightforward fix and
should be folded in to the patch which has introduced vmstat_refresh.
---
>From b8dd18fb7df040e1bfe61aadde1d903589de15e4 Mon Sep 17 00:00:00 2001
From: Michal Hocko <mhocko@...e.com>
Date: Mon, 16 May 2016 16:19:53 +0200
Subject: [PATCH] mmotm: mm-proc-sys-vm-stat_refresh-to-force-vmstat-update-fix

Arnd has reported:
In randconfig builds with sysfs, procfs and numa all disabled,
but SMP enabled, we now get a link error in the newly introduced
vmstat_refresh function:

mm/built-in.o: In function `vmstat_refresh':
:(.text+0x15c78): undefined reference to `vmstat_text'

vmstat_refresh is proc_fs specific so there is no reason to define it
when !CONFIG_PROC_FS.

Reported-by: Arnd Bergmann <arnd@...db.de>
Acked-by: Christoph Lameter <cl@...ux.com>
Signed-off-by: Michal Hocko <mhocko@...e.com>
---
 mm/vmstat.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/mm/vmstat.c b/mm/vmstat.c
index 57a24e919907..c759b526287b 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -1370,6 +1370,7 @@ static void refresh_vm_stats(struct work_struct *work)
 	refresh_cpu_vm_stats(true);
 }
 
+#ifdef CONFIG_PROC_FS
 int vmstat_refresh(struct ctl_table *table, int write,
 		   void __user *buffer, size_t *lenp, loff_t *ppos)
 {
@@ -1422,6 +1423,7 @@ int vmstat_refresh(struct ctl_table *table, int write,
 		*lenp = 0;
 	return 0;
 }
+#endif
 
 static void vmstat_update(struct work_struct *w)
 {
-- 
2.8.1

-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists