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] [day] [month] [year] [list]
Message-ID: <tip-323f54ed0f3ce20e9946c961fc928ccdb80d9345@git.kernel.org>
Date:	Fri, 26 Jul 2013 13:04:00 -0700
From:	tip-bot for Tom Rini <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	mingo@...nel.org, rusty@...tcorp.com.au, pebolle@...cali.nl,
	isimatu.yasuaki@...fujitsu.com, jiang.liu@...wei.com,
	tglx@...utronix.de, rientjes@...gle.com, trini@...com,
	laijs@...fujitsu.com, linux-kernel@...r.kernel.org, hpa@...or.com,
	majianpeng@...il.com, yinghai@...nel.org, greg@...ah.com,
	wency@...fujitsu.com, minchan.kim@...il.com, mgorman@...e.de,
	kosaki.motohiro@...fujitsu.com
Subject: [tip:sched/core] numa: Mark __node_set() as __always_inline

Commit-ID:  323f54ed0f3ce20e9946c961fc928ccdb80d9345
Gitweb:     http://git.kernel.org/tip/323f54ed0f3ce20e9946c961fc928ccdb80d9345
Author:     Tom Rini <trini@...com>
AuthorDate: Thu, 25 Jul 2013 14:26:10 -0400
Committer:  Ingo Molnar <mingo@...nel.org>
CommitDate: Thu, 25 Jul 2013 21:54:01 +0200

numa: Mark __node_set() as __always_inline

It is posible for some compilers to decide that __node_set() does
not need to be made turned into an inline function.  When the
compiler does this on an __init function calling it on
__initdata we get a section mismatch warning now.  Use
__always_inline to ensure that we will be inlined.

Reported-by: Paul Bolle <pebolle@...cali.nl>
Cc: Jianpeng Ma <majianpeng@...il.com>
Cc: Rusty Russell <rusty@...tcorp.com.au>
Cc: Lai Jiangshan <laijs@...fujitsu.com>
Cc: Yasuaki Ishimatsu <isimatu.yasuaki@...fujitsu.com>
Cc: Wen Congyang <wency@...fujitsu.com>
Cc: Jiang Liu <jiang.liu@...wei.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
Cc: Minchan Kim <minchan.kim@...il.com>
Cc: Mel Gorman <mgorman@...e.de>
Cc: David Rientjes <rientjes@...gle.com>
Cc: Yinghai Lu <yinghai@...nel.org>
Cc: Greg KH <greg@...ah.com>
Signed-off-by: Tom Rini <trini@...com>
Link: http://lkml.kernel.org/r/1374776770-32361-1-git-send-email-trini@ti.com
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 include/linux/nodemask.h | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/include/linux/nodemask.h b/include/linux/nodemask.h
index 4e2cbfa..58b9a02 100644
--- a/include/linux/nodemask.h
+++ b/include/linux/nodemask.h
@@ -98,8 +98,17 @@
 typedef struct { DECLARE_BITMAP(bits, MAX_NUMNODES); } nodemask_t;
 extern nodemask_t _unused_nodemask_arg_;
 
+/*
+ * The inline keyword gives the compiler room to decide to inline, or
+ * not inline a function as it sees best.  However, as these functions
+ * are called in both __init and non-__init functions, if they are not
+ * inlined we will end up with a section mis-match error (of the type of
+ * freeable items not being freed).  So we must use __always_inline here
+ * to fix the problem.  If other functions in the future also end up in
+ * this situation they will also need to be annotated as __always_inline
+ */
 #define node_set(node, dst) __node_set((node), &(dst))
-static inline void __node_set(int node, volatile nodemask_t *dstp)
+static __always_inline void __node_set(int node, volatile nodemask_t *dstp)
 {
 	set_bit(node, dstp->bits);
 }
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ