summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/acct.c5
-rw-r--r--kernel/exit.c4
-rw-r--r--kernel/fork.c2
-rw-r--r--kernel/kmod.c22
-rw-r--r--kernel/ksyms.c5
-rw-r--r--kernel/panic.c18
-rw-r--r--kernel/sched.c1
7 files changed, 47 insertions, 10 deletions
diff --git a/kernel/acct.c b/kernel/acct.c
index f15b6971f..2bd7d121d 100644
--- a/kernel/acct.c
+++ b/kernel/acct.c
@@ -36,8 +36,7 @@
* but this one obviously doesn't introduce deadlocks. Later. BTW, found
* one race (and leak) in BSD implementation.
* OK, that's better. ANOTHER race and leak in BSD variant. There always
- * is one more bug... TODO: move filp_open into open.c and make
- * parameters sysctl-controllable. 10/11/98, AV.
+ * is one more bug... 10/11/98, AV.
*/
#include <linux/config.h>
@@ -154,7 +153,7 @@ asmlinkage long sys_acct(const char *name)
if (IS_ERR(tmp))
goto out;
/* Difference from BSD - they don't do O_APPEND */
- file = filp_open(tmp, O_WRONLY|O_APPEND, 0, NULL);
+ file = filp_open(tmp, O_WRONLY|O_APPEND, 0);
putname(tmp);
if (IS_ERR(file)) {
error = PTR_ERR(file);
diff --git a/kernel/exit.c b/kernel/exit.c
index 4684b8c37..45f85aec3 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -216,7 +216,9 @@ static inline void __exit_fs(struct task_struct *tsk)
tsk->fs = NULL;
if (atomic_dec_and_test(&fs->count)) {
dput(fs->root);
+ mntput(fs->rootmnt);
dput(fs->pwd);
+ mntput(fs->pwdmnt);
kfree(fs);
}
}
@@ -414,12 +416,12 @@ fake_volatile:
#ifdef CONFIG_BSD_PROCESS_ACCT
acct_process(code);
#endif
- task_lock(tsk);
sem_exit();
__exit_mm(tsk);
__exit_files(tsk);
__exit_fs(tsk);
__exit_sighand(tsk);
+ task_lock(tsk);
exit_thread();
tsk->state = TASK_ZOMBIE;
tsk->exit_code = code;
diff --git a/kernel/fork.c b/kernel/fork.c
index 2fbb08e32..6eca792d9 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -432,6 +432,8 @@ static inline int copy_fs(unsigned long clone_flags, struct task_struct * tsk)
tsk->fs->umask = current->fs->umask;
tsk->fs->root = dget(current->fs->root);
tsk->fs->pwd = dget(current->fs->pwd);
+ tsk->fs->rootmnt = mntget(current->fs->rootmnt);
+ tsk->fs->pwdmnt = mntget(current->fs->pwdmnt);
return 0;
}
diff --git a/kernel/kmod.c b/kernel/kmod.c
index dca806e94..75d31eadf 100644
--- a/kernel/kmod.c
+++ b/kernel/kmod.c
@@ -54,11 +54,15 @@ use_init_fs_context(void)
our_fs = current->fs;
dput(our_fs->root);
dput(our_fs->pwd);
+ mntput(our_fs->rootmnt);
+ mntput(our_fs->pwdmnt);
init_fs = init_task.fs;
our_fs->umask = init_fs->umask;
our_fs->root = dget(init_fs->root);
our_fs->pwd = dget(init_fs->pwd);
+ our_fs->rootmnt = mntget(init_fs->rootmnt);
+ our_fs->pwdmnt = mntget(init_fs->pwdmnt);
unlock_kernel();
}
@@ -119,10 +123,20 @@ static int exec_modprobe(void * module_name)
return ret;
}
-/*
- request_module: the function that everyone calls when they need
- a module.
-*/
+/**
+ * request_module - try to load a kernel module
+ * @module_name: Name of module
+ *
+ * Load a module using the user mode module loader. The function returns
+ * zero on success or a negative errno code on failure. Note that a
+ * successful module load does not mean the module did not then unload
+ * and exit on an error of its own. Callers must check that the service
+ * they requested is now available not blindly invoke it.
+ *
+ * If module auto-loading support is disabled then this function
+ * becomes a no-operation.
+ */
+
int request_module(const char * module_name)
{
int pid;
diff --git a/kernel/ksyms.c b/kernel/ksyms.c
index ad11eafea..89136a218 100644
--- a/kernel/ksyms.c
+++ b/kernel/ksyms.c
@@ -141,8 +141,9 @@ EXPORT_SYMBOL(iget4);
EXPORT_SYMBOL(iput);
EXPORT_SYMBOL(__namei);
EXPORT_SYMBOL(lookup_dentry);
+EXPORT_SYMBOL(walk_init);
+EXPORT_SYMBOL(walk_name);
EXPORT_SYMBOL(lookup_one);
-EXPORT_SYMBOL(__open_namei);
EXPORT_SYMBOL(sys_close);
EXPORT_SYMBOL(d_alloc_root);
EXPORT_SYMBOL(d_delete);
@@ -153,7 +154,7 @@ EXPORT_SYMBOL(d_move);
EXPORT_SYMBOL(d_instantiate);
EXPORT_SYMBOL(d_alloc);
EXPORT_SYMBOL(d_lookup);
-EXPORT_SYMBOL(d_path);
+EXPORT_SYMBOL(__d_path);
EXPORT_SYMBOL(mark_buffer_dirty);
EXPORT_SYMBOL(__mark_buffer_dirty);
EXPORT_SYMBOL(__mark_inode_dirty);
diff --git a/kernel/panic.c b/kernel/panic.c
index e040ee454..920e4a1a7 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -8,6 +8,7 @@
* This function is used through-out the kernel (including mm and fs)
* to indicate a major problem.
*/
+#include <linux/config.h>
#include <linux/sched.h>
#include <linux/delay.h>
#include <linux/reboot.h>
@@ -32,10 +33,24 @@ static int __init panic_setup(char *str)
__setup("panic=", panic_setup);
+/**
+ * panic - halt the system
+ * @fmt: The text string to print
+ *
+ * Display a message, then unblank the console and perform
+ * cleanups. Functions in the panic notifier list are called
+ * after the filesystem cache is flushed (when possible).
+ *
+ * This function never returns.
+ */
+
NORET_TYPE void panic(const char * fmt, ...)
{
static char buf[1024];
va_list args;
+#if defined(CONFIG_ARCH_S390)
+ unsigned long caller = (unsigned long) __builtin_return_address(0);
+#endif
va_start(args, fmt);
vsprintf(buf, fmt, args);
@@ -79,6 +94,9 @@ NORET_TYPE void panic(const char * fmt, ...)
printk("Press L1-A to return to the boot prom\n");
}
#endif
+#if defined(CONFIG_ARCH_S390)
+ disabled_wait(caller);
+#endif
sti();
for(;;) {
CHECK_EMERGENCY_SYNC
diff --git a/kernel/sched.c b/kernel/sched.c
index c0ac80395..d1d49df5c 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -405,6 +405,7 @@ signed long schedule_timeout(signed long timeout)
*/
static inline void __schedule_tail(struct task_struct *prev)
{
+ current->need_resched |= prev->need_resched;
#ifdef __SMP__
if ((prev->state == TASK_RUNNING) &&
(prev != idle_task(smp_processor_id()))) {