diff options
author | Holger Schurig <hs4233@mail.mn-solutions.de> | 2008-04-29 04:02:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-29 11:06:22 -0400 |
commit | 88f458e4b91348b2e892c72977b5f665d7f374da (patch) | |
tree | 1ef9e98f74fc63193327053af079079e23aa8443 /kernel/sysctl.c | |
parent | c7705f3449c7edd5c1744871097f93977227afc4 (diff) |
sysctl: allow embedded targets to disable sysctl_check.c
Disable sysctl_check.c for embedded targets. This saves about about 11 kB
in .text and another 11 kB in .data on a PXA255 embedded platform.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r-- | kernel/sysctl.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 0a1d2733cf41..1cdfe942d160 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
@@ -1592,9 +1592,13 @@ static void sysctl_set_parent(struct ctl_table *parent, struct ctl_table *table) | |||
1592 | 1592 | ||
1593 | static __init int sysctl_init(void) | 1593 | static __init int sysctl_init(void) |
1594 | { | 1594 | { |
1595 | int err; | ||
1596 | sysctl_set_parent(NULL, root_table); | 1595 | sysctl_set_parent(NULL, root_table); |
1597 | err = sysctl_check_table(current->nsproxy, root_table); | 1596 | #ifdef CONFIG_SYSCTL_SYSCALL_CHECK |
1597 | { | ||
1598 | int err; | ||
1599 | err = sysctl_check_table(current->nsproxy, root_table); | ||
1600 | } | ||
1601 | #endif | ||
1598 | return 0; | 1602 | return 0; |
1599 | } | 1603 | } |
1600 | 1604 | ||
@@ -1721,10 +1725,12 @@ struct ctl_table_header *__register_sysctl_paths( | |||
1721 | header->unregistering = NULL; | 1725 | header->unregistering = NULL; |
1722 | header->root = root; | 1726 | header->root = root; |
1723 | sysctl_set_parent(NULL, header->ctl_table); | 1727 | sysctl_set_parent(NULL, header->ctl_table); |
1728 | #ifdef CONFIG_SYSCTL_SYSCALL_CHECK | ||
1724 | if (sysctl_check_table(namespaces, header->ctl_table)) { | 1729 | if (sysctl_check_table(namespaces, header->ctl_table)) { |
1725 | kfree(header); | 1730 | kfree(header); |
1726 | return NULL; | 1731 | return NULL; |
1727 | } | 1732 | } |
1733 | #endif | ||
1728 | spin_lock(&sysctl_lock); | 1734 | spin_lock(&sysctl_lock); |
1729 | header_list = lookup_header_list(root, namespaces); | 1735 | header_list = lookup_header_list(root, namespaces); |
1730 | list_add_tail(&header->ctl_entry, header_list); | 1736 | list_add_tail(&header->ctl_entry, header_list); |