From: Randy Dunlap <randy.dunlap@oracle.com>
To: akpm@linux-foundation.org, Dan Rosenberg <drosenberg@vsecurity.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
linux-fsdevel@vger.kernel.org
Subject: [PATCH -mmotm] kptr_restrict: fix build when PRINTK not enabled
Date: Fri, 24 Dec 2010 09:52:26 -0800 [thread overview]
Message-ID: <20101224095226.2129fa9c.randy.dunlap@oracle.com> (raw)
In-Reply-To: <201012240132.oBO1W8Ub022207@imap1.linux-foundation.org>
From: Randy Dunlap <randy.dunlap@oracle.com>
#include <linux/printk.h> since that is where kptr_restrict is externed.
Put kptr_restrict inside #ifdef CONFIG_PRINTK block to fix build error
when CONFIG_PRINTK is not enabled:
kernel/sysctl.c:712: error: 'kptr_restrict' undeclared here (not in a function)
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Dan Rosenberg <drosenberg@vsecurity.com>
---
kernel/sysctl.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- mmotm-2010-1223-1658.orig/kernel/sysctl.c
+++ mmotm-2010-1223-1658/kernel/sysctl.c
@@ -24,6 +24,7 @@
#include <linux/slab.h>
#include <linux/sysctl.h>
#include <linux/signal.h>
+#include <linux/printk.h>
#include <linux/proc_fs.h>
#include <linux/security.h>
#include <linux/ctype.h>
@@ -706,7 +707,6 @@ static struct ctl_table kern_table[] = {
.extra1 = &zero,
.extra2 = &one,
},
-#endif
{
.procname = "kptr_restrict",
.data = &kptr_restrict,
@@ -716,6 +716,7 @@ static struct ctl_table kern_table[] = {
.extra1 = &zero,
.extra2 = &two,
},
+#endif
{
.procname = "ngroups_max",
.data = &ngroups_max,
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
desserts: http://www.xenotime.net/linux/recipes/
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2010-12-24 17:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-24 0:58 mmotm 2010-12-23-16-58 uploaded akpm
2010-12-24 12:15 ` Sedat Dilek
2010-12-24 13:04 ` Andrew Morton
2010-12-24 17:52 ` Randy Dunlap [this message]
2010-12-27 2:13 ` Randy Dunlap
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101224095226.2129fa9c.randy.dunlap@oracle.com \
--to=randy.dunlap@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=drosenberg@vsecurity.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).