diff options
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/Makefile | 3 | ||||
| -rw-r--r-- | kernel/acct.c | 18 | ||||
| -rw-r--r-- | kernel/exit.c | 10 | ||||
| -rw-r--r-- | kernel/ksyms.c | 3 | ||||
| -rw-r--r-- | kernel/sys.c | 12 | ||||
| -rw-r--r-- | kernel/sysctl.c | 8 |
6 files changed, 23 insertions, 31 deletions
diff --git a/kernel/Makefile b/kernel/Makefile index 54a895656270..2384e5fe9bea 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -14,12 +14,13 @@ export-objs = signal.o sys.o kmod.o context.o ksyms.o pm.o exec_domain.o \ obj-y = sched.o dma.o fork.o exec_domain.o panic.o printk.o \ module.o exit.o itimer.o info.o time.o softirq.o resource.o \ - sysctl.o acct.o capability.o ptrace.o timer.o user.o \ + sysctl.o capability.o ptrace.o timer.o user.o \ signal.o sys.o kmod.o context.o futex.o obj-$(CONFIG_UID16) += uid16.o obj-$(CONFIG_MODULES) += ksyms.o obj-$(CONFIG_PM) += pm.o +obj-$(CONFIG_BSD_PROCESS_ACCT) += acct.o ifneq ($(CONFIG_IA64),y) # According to Alan Modra <alan@linuxcare.com.au>, the -fno-omit-frame-pointer is diff --git a/kernel/acct.c b/kernel/acct.c index 31390d55a72f..dbb9312e0624 100644 --- a/kernel/acct.c +++ b/kernel/acct.c @@ -44,17 +44,11 @@ */ #include <linux/config.h> -#include <linux/errno.h> -#include <linux/kernel.h> - -#ifdef CONFIG_BSD_PROCESS_ACCT #include <linux/mm.h> #include <linux/slab.h> #include <linux/acct.h> -#include <linux/smp_lock.h> #include <linux/file.h> #include <linux/tty.h> - #include <asm/uaccess.h> /* @@ -397,15 +391,3 @@ int acct_process(long exitcode) spin_unlock(&acct_globals.lock); return 0; } - -#else -/* - * Dummy system call when BSD process accounting is not configured - * into the kernel. - */ - -asmlinkage long sys_acct(const char * filename) -{ - return -ENOSYS; -} -#endif diff --git a/kernel/exit.c b/kernel/exit.c index d2cba1fc65d5..96472474ada7 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -14,9 +14,7 @@ #include <linux/personality.h> #include <linux/tty.h> #include <linux/namespace.h> -#ifdef CONFIG_BSD_PROCESS_ACCT #include <linux/acct.h> -#endif #include <linux/file.h> #include <linux/binfmts.h> @@ -492,13 +490,15 @@ NORET_TYPE void do_exit(long code) tsk->flags |= PF_EXITING; del_timer_sync(&tsk->real_timer); + if (unlikely(preempt_get_count())) + printk(KERN_ERR "error: %s[%d] exited with preempt_count %d\n", + current->comm, current->pid, + preempt_get_count()); + fake_volatile: -#ifdef CONFIG_BSD_PROCESS_ACCT acct_process(code); -#endif __exit_mm(tsk); - lock_kernel(); sem_exit(); __exit_files(tsk); __exit_fs(tsk); diff --git a/kernel/ksyms.c b/kernel/ksyms.c index a59e0ee7bd86..519a500fb547 100644 --- a/kernel/ksyms.c +++ b/kernel/ksyms.c @@ -107,7 +107,7 @@ EXPORT_SYMBOL(kmalloc); EXPORT_SYMBOL(kfree); EXPORT_SYMBOL(vfree); EXPORT_SYMBOL(__vmalloc); -EXPORT_SYMBOL_GPL(vmalloc_to_page); +EXPORT_SYMBOL(vmalloc_to_page); EXPORT_SYMBOL(mem_map); EXPORT_SYMBOL(remap_page_range); EXPORT_SYMBOL(max_mapnr); @@ -537,7 +537,6 @@ EXPORT_SYMBOL(sys_tz); EXPORT_SYMBOL(file_fsync); EXPORT_SYMBOL(fsync_buffers_list); EXPORT_SYMBOL(clear_inode); -EXPORT_SYMBOL(___strtok); EXPORT_SYMBOL(init_special_inode); EXPORT_SYMBOL(__get_hash_table); EXPORT_SYMBOL(new_inode); diff --git a/kernel/sys.c b/kernel/sys.c index fc8e5e4060a0..54f018e69bf5 100644 --- a/kernel/sys.c +++ b/kernel/sys.c @@ -173,6 +173,18 @@ asmlinkage long sys_ni_syscall(void) return -ENOSYS; } +/* + * "Conditional" syscalls + * + * What we want is __attribute__((weak,alias("sys_ni_syscall"))), + * but it doesn't work on sparc64, so we just do it by hand + */ +#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall"); + +cond_syscall(sys_nfsservctl) +cond_syscall(sys_quotactl) +cond_syscall(sys_acct) + static int proc_sel(struct task_struct *p, int which, int who) { if(p->pid) diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 64dca468d417..66ccb010e1e5 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -284,8 +284,6 @@ static ctl_table fs_table[] = { 0444, NULL, &proc_dointvec}, {FS_MAXFILE, "file-max", &files_stat.max_files, sizeof(int), 0644, NULL, &proc_dointvec}, - {FS_NRDQUOT, "dquot-nr", &nr_dquots, 2*sizeof(int), - 0444, NULL, &proc_dointvec}, {FS_DENTRY, "dentry-state", &dentry_stat, 6*sizeof(int), 0444, NULL, &proc_dointvec}, {FS_OVERFLOWUID, "overflowuid", &fs_overflowuid, sizeof(int), 0644, NULL, @@ -476,11 +474,11 @@ int do_sysctl_strategy (ctl_table *table, } /** - * register_sysctl_table - register a sysctl heirarchy + * register_sysctl_table - register a sysctl hierarchy * @table: the top-level table structure * @insert_at_head: whether the entry should be inserted in front or at the end * - * Register a sysctl table heirarchy. @table should be a filled in ctl_table + * Register a sysctl table hierarchy. @table should be a filled in ctl_table * array. An entry with a ctl_name of 0 terminates the table. * * The members of the &ctl_table structure are used as follows: @@ -564,7 +562,7 @@ struct ctl_table_header *register_sysctl_table(ctl_table * table, } /** - * unregister_sysctl_table - unregister a sysctl table heirarchy + * unregister_sysctl_table - unregister a sysctl table hierarchy * @header: the header returned from register_sysctl_table * * Unregisters the sysctl table and all children. proc entries may not |
