diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2001-01-10 17:17:53 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2001-01-10 17:17:53 +0000 |
commit | b2ad5f821b1381492d792ca10b1eb7a107b48f14 (patch) | |
tree | 954a648692e7da983db1d2470953705f6a729264 /kernel | |
parent | c9c06167e7933d93a6e396174c68abf242294abb (diff) |
Merge with Linux 2.4.0-prerelease. Big Makefile rewrite, test your
Makefiles.
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/Makefile | 22 | ||||
-rw-r--r-- | kernel/exit.c | 2 | ||||
-rw-r--r-- | kernel/fork.c | 5 | ||||
-rw-r--r-- | kernel/kmod.c | 34 | ||||
-rw-r--r-- | kernel/ksyms.c | 11 | ||||
-rw-r--r-- | kernel/printk.c | 4 | ||||
-rw-r--r-- | kernel/softirq.c | 26 | ||||
-rw-r--r-- | kernel/sysctl.c | 6 |
8 files changed, 73 insertions, 37 deletions
diff --git a/kernel/Makefile b/kernel/Makefile index 311d66cb8..9adeb6b2c 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -8,23 +8,17 @@ # Note 2! The CFLAGS definitions are now in the main makefile... O_TARGET := kernel.o -O_OBJS = 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 - -OX_OBJS += signal.o sys.o kmod.o context.o -ifeq ($(CONFIG_UID16),y) -O_OBJS += uid16.o -endif +export-objs = signal.o sys.o kmod.o context.o ksyms.o pm.o -ifeq ($(CONFIG_MODULES),y) -OX_OBJS += ksyms.o -endif +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 \ + signal.o sys.o kmod.o context.o -ifeq ($(CONFIG_PM),y) -OX_OBJS += pm.o -endif +obj-$(CONFIG_UID16) += uid16.o +obj-$(CONFIG_MODULES) += ksyms.o +obj-$(CONFIG_PM) += pm.o ifneq ($(CONFIG_IA64),y) # According to Alan Modra <alan@linuxcare.com.au>, the -fno-omit-frame-pointer is diff --git a/kernel/exit.c b/kernel/exit.c index 99d4f6770..50a9f51de 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -425,7 +425,7 @@ NORET_TYPE void do_exit(long code) struct task_struct *tsk = current; if (in_interrupt()) - printk("Aiee, killing interrupt handler\n"); + panic("Aiee, killing interrupt handler!"); if (!tsk->pid) panic("Attempted to kill the idle task!"); if (tsk->pid == 1) diff --git a/kernel/fork.c b/kernel/fork.c index bf3e36cfb..f5d3a83df 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -133,11 +133,9 @@ static inline int dup_mmap(struct mm_struct * mm) mm->mmap_avl = NULL; mm->mmap_cache = NULL; mm->map_count = 0; - mm->context = 0; mm->cpu_vm_mask = 0; mm->swap_cnt = 0; mm->swap_address = 0; - mm->segments = NULL; pprev = &mm->mmap; for (mpnt = current->mm->mmap ; mpnt ; mpnt = mpnt->vm_next) { struct file *file; @@ -179,10 +177,9 @@ static inline int dup_mmap(struct mm_struct * mm) * Link in the new vma even if an error occurred, * so that exit_mmap() can clean up the mess. */ - tmp->vm_next = *pprev; *pprev = tmp; - pprev = &tmp->vm_next; + if (retval) goto fail_nomem; } diff --git a/kernel/kmod.c b/kernel/kmod.c index b68392685..ac840a901 100644 --- a/kernel/kmod.c +++ b/kernel/kmod.c @@ -11,6 +11,9 @@ Limit the concurrent number of kmod modprobes to catch loops from "modprobe needs a service that is in a module". Keith Owens <kaos@ocs.com.au> December 1999 + + Unblock all signals when we exec a usermode process. + Shuu Yamaguchi <shuu@wondernetworkresources.com> December 2000 */ #define __KERNEL_SYSCALLS__ @@ -83,9 +86,10 @@ use_init_fs_context(void) int exec_usermodehelper(char *program_path, char *argv[], char *envp[]) { int i; + struct task_struct *curtask = current; - current->session = 1; - current->pgrp = 1; + curtask->session = 1; + curtask->pgrp = 1; use_init_fs_context(); @@ -95,19 +99,21 @@ int exec_usermodehelper(char *program_path, char *argv[], char *envp[]) as the super user right after the execve fails if you time the signal just right. */ - spin_lock_irq(¤t->sigmask_lock); - flush_signals(current); - flush_signal_handlers(current); - spin_unlock_irq(¤t->sigmask_lock); - - for (i = 0; i < current->files->max_fds; i++ ) { - if (current->files->fd[i]) close(i); + spin_lock_irq(&curtask->sigmask_lock); + sigemptyset(&curtask->blocked); + flush_signals(curtask); + flush_signal_handlers(curtask); + recalc_sigpending(curtask); + spin_unlock_irq(&curtask->sigmask_lock); + + for (i = 0; i < curtask->files->max_fds; i++ ) { + if (curtask->files->fd[i]) close(i); } /* Drop the "current user" thing */ { - struct user_struct *user = current->user; - current->user = INIT_USER; + struct user_struct *user = curtask->user; + curtask->user = INIT_USER; atomic_inc(&INIT_USER->__count); atomic_inc(&INIT_USER->processes); atomic_dec(&user->processes); @@ -115,9 +121,9 @@ int exec_usermodehelper(char *program_path, char *argv[], char *envp[]) } /* Give kmod all effective privileges.. */ - current->euid = current->fsuid = 0; - current->egid = current->fsgid = 0; - cap_set_full(current->cap_effective); + curtask->euid = curtask->fsuid = 0; + curtask->egid = curtask->fsgid = 0; + cap_set_full(curtask->cap_effective); /* Allow execve args to be in kernel space. */ set_fs(KERNEL_DS); diff --git a/kernel/ksyms.c b/kernel/ksyms.c index 4ed94117e..8d74cdb91 100644 --- a/kernel/ksyms.c +++ b/kernel/ksyms.c @@ -188,6 +188,7 @@ EXPORT_SYMBOL(bread); EXPORT_SYMBOL(__brelse); EXPORT_SYMBOL(__bforget); EXPORT_SYMBOL(ll_rw_block); +EXPORT_SYMBOL(submit_bh); EXPORT_SYMBOL(__wait_on_buffer); EXPORT_SYMBOL(___wait_on_page); EXPORT_SYMBOL(block_write_full_page); @@ -257,7 +258,6 @@ EXPORT_SYMBOL(dcache_readdir); EXPORT_SYMBOL(default_llseek); EXPORT_SYMBOL(dentry_open); EXPORT_SYMBOL(filemap_nopage); -EXPORT_SYMBOL(filemap_swapout); EXPORT_SYMBOL(filemap_sync); EXPORT_SYMBOL(lock_page); @@ -429,9 +429,13 @@ EXPORT_SYMBOL(jiffies); EXPORT_SYMBOL(xtime); EXPORT_SYMBOL(do_gettimeofday); EXPORT_SYMBOL(do_settimeofday); -#ifndef __ia64__ + +#ifdef CONFIG_X86 +EXPORT_SYMBOL(loops_per_jiffy); +#elif !defined(__ia64__) EXPORT_SYMBOL(loops_per_sec); #endif + EXPORT_SYMBOL(kstat); EXPORT_SYMBOL(nr_running); @@ -474,6 +478,7 @@ EXPORT_SYMBOL(si_meminfo); EXPORT_SYMBOL(sys_tz); EXPORT_SYMBOL(__wait_on_super); EXPORT_SYMBOL(file_fsync); +EXPORT_SYMBOL(fsync_inode_buffers); EXPORT_SYMBOL(clear_inode); EXPORT_SYMBOL(nr_async_pages); EXPORT_SYMBOL(___strtok); @@ -483,6 +488,7 @@ EXPORT_SYMBOL(get_hash_table); EXPORT_SYMBOL(get_empty_inode); EXPORT_SYMBOL(insert_inode_hash); EXPORT_SYMBOL(remove_inode_hash); +EXPORT_SYMBOL(buffer_insert_inode_queue); EXPORT_SYMBOL(make_bad_inode); EXPORT_SYMBOL(is_bad_inode); EXPORT_SYMBOL(event); @@ -524,6 +530,7 @@ EXPORT_SYMBOL(init_bh); EXPORT_SYMBOL(remove_bh); EXPORT_SYMBOL(tasklet_init); EXPORT_SYMBOL(tasklet_kill); +EXPORT_SYMBOL(__run_task_queue); /* init task, for moving kthread roots - ought to export a function ?? */ diff --git a/kernel/printk.c b/kernel/printk.c index 72e27f35a..0c6299b0d 100644 --- a/kernel/printk.c +++ b/kernel/printk.c @@ -113,8 +113,8 @@ __setup("console=", console_setup); * 0 -- Close the log. Currently a NOP. * 1 -- Open the log. Currently a NOP. * 2 -- Read from the log. - * 3 -- Read up to the last 4k of messages in the ring buffer. - * 4 -- Read and clear last 4k of messages in the ring buffer + * 3 -- Read all messages remaining in the ring buffer. + * 4 -- Read and clear all messages remaining in the ring buffer * 5 -- Clear ring buffer. * 6 -- Disable printk's to console * 7 -- Enable printk's to console diff --git a/kernel/softirq.c b/kernel/softirq.c index f7be8abd3..fe066399d 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c @@ -15,6 +15,7 @@ #include <linux/interrupt.h> #include <linux/smp_lock.h> #include <linux/init.h> +#include <linux/tqueue.h> /* - No shared variables, all the data are CPU local. @@ -288,4 +289,29 @@ void __init softirq_init() open_softirq(HI_SOFTIRQ, tasklet_hi_action, NULL); } +void __run_task_queue(task_queue *list) +{ + struct list_head head, *next; + unsigned long flags; + spin_lock_irqsave(&tqueue_lock, flags); + list_add(&head, list); + list_del_init(list); + spin_unlock_irqrestore(&tqueue_lock, flags); + + next = head.next; + while (next != &head) { + void (*f) (void *); + struct tq_struct *p; + void *data; + + p = list_entry(next, struct tq_struct, list); + next = next->next; + f = p->routine; + data = p->data; + wmb(); + p->sync = 0; + if (f) + f(data); + } +} diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 3fdf03c34..1c22d7838 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -63,6 +63,8 @@ extern int sg_big_buff; #endif #ifdef CONFIG_SYSVIPC extern size_t shm_ctlmax; +extern size_t shm_ctlall; +extern int shm_ctlmni; extern int msg_ctlmax; extern int msg_ctlmnb; extern int msg_ctlmni; @@ -208,6 +210,10 @@ static ctl_table kern_table[] = { #ifdef CONFIG_SYSVIPC {KERN_SHMMAX, "shmmax", &shm_ctlmax, sizeof (size_t), 0644, NULL, &proc_doulongvec_minmax}, + {KERN_SHMALL, "shmall", &shm_ctlall, sizeof (size_t), + 0644, NULL, &proc_doulongvec_minmax}, + {KERN_SHMMNI, "shmmni", &shm_ctlmni, sizeof (int), + 0644, NULL, &proc_dointvec}, {KERN_MSGMAX, "msgmax", &msg_ctlmax, sizeof (int), 0644, NULL, &proc_dointvec}, {KERN_MSGMNI, "msgmni", &msg_ctlmni, sizeof (int), |