summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-02-18 00:24:27 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-02-18 00:24:27 +0000
commitb9558d5f86c471a125abf1fb3a3882fb053b1f8c (patch)
tree707b53ec64e740a7da87d5f36485e3cd9b1c794e /kernel
parentb3ac367c7a3e6047abe74817db27e34e759f279f (diff)
Merge with Linux 2.3.41.
Diffstat (limited to 'kernel')
-rw-r--r--kernel/dma.c26
-rw-r--r--kernel/exit.c6
-rw-r--r--kernel/ksyms.c7
-rw-r--r--kernel/sched.c2
-rw-r--r--kernel/signal.c5
-rw-r--r--kernel/sys.c23
-rw-r--r--kernel/sysctl.c15
7 files changed, 51 insertions, 33 deletions
diff --git a/kernel/dma.c b/kernel/dma.c
index e9f0f7a52..983dedb60 100644
--- a/kernel/dma.c
+++ b/kernel/dma.c
@@ -16,6 +16,7 @@
#include <asm/dma.h>
#include <asm/system.h>
+
/* A note on resource allocation:
*
@@ -35,6 +36,12 @@
spinlock_t dma_spin_lock = SPIN_LOCK_UNLOCKED;
+/*
+ * If our port doesn't define this it has no PC like DMA
+ */
+
+#ifdef MAX_DMA_CHANNELS
+
/* Channel n is busy iff dma_chan_busy[n].lock != 0.
* DMA0 used to be reserved for DRAM refresh, but apparently not any more...
@@ -100,3 +107,22 @@ void free_dma(unsigned int dmanr)
}
} /* free_dma */
+
+#else
+
+int request_dma(unsigned int dmanr, const char *device_id)
+{
+ return -EINVAL;
+}
+
+int free_dma(unsigned int dmanr)
+{
+ return -EINVAL;
+}
+
+int get_dma_list(char *buf)
+{
+ strcpy(buf, "No DMA\n");
+ return 7;
+}
+#endif
diff --git a/kernel/exit.c b/kernel/exit.c
index 374241c67..0537ff06d 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -416,9 +416,6 @@ fake_volatile:
tsk->exit_code = code;
exit_notify();
task_unlock(tsk);
-#ifdef DEBUG_PROC_TREE
- audit_ptree();
-#endif
if (tsk->exec_domain && tsk->exec_domain->module)
__MOD_DEC_USE_COUNT(tsk->exec_domain->module);
if (tsk->binfmt && tsk->binfmt->module)
@@ -508,9 +505,6 @@ repeat:
notify_parent(p, SIGCHLD);
} else
release(p);
-#ifdef DEBUG_PROC_TREE
- audit_ptree();
-#endif
goto end_wait4;
default:
continue;
diff --git a/kernel/ksyms.c b/kernel/ksyms.c
index 31bc6edc0..dea3c38a5 100644
--- a/kernel/ksyms.c
+++ b/kernel/ksyms.c
@@ -183,7 +183,6 @@ EXPORT_SYMBOL(__bforget);
EXPORT_SYMBOL(ll_rw_block);
EXPORT_SYMBOL(__wait_on_buffer);
EXPORT_SYMBOL(___wait_on_page);
-EXPORT_SYMBOL(add_blkdev_randomness);
EXPORT_SYMBOL(block_read_full_page);
EXPORT_SYMBOL(block_write_full_page);
EXPORT_SYMBOL(block_write_partial_page);
@@ -270,7 +269,6 @@ EXPORT_SYMBOL(tq_disk);
EXPORT_SYMBOL(init_buffer);
EXPORT_SYMBOL(refile_buffer);
EXPORT_SYMBOL(max_sectors);
-EXPORT_SYMBOL(max_segments);
EXPORT_SYMBOL(max_readahead);
EXPORT_SYMBOL(file_moveto);
@@ -434,11 +432,14 @@ EXPORT_SYMBOL(__down_trylock);
EXPORT_SYMBOL(__up);
EXPORT_SYMBOL(brw_page);
+#ifdef CONFIG_UID16
+EXPORT_SYMBOL(overflowuid);
+EXPORT_SYMBOL(overflowgid);
+#endif
EXPORT_SYMBOL(fs_overflowuid);
EXPORT_SYMBOL(fs_overflowgid);
/* all busmice */
-EXPORT_SYMBOL(add_mouse_randomness);
EXPORT_SYMBOL(fasync_helper);
#ifdef CONFIG_BLK_DEV_MD
diff --git a/kernel/sched.c b/kernel/sched.c
index 09817384f..ce72ecc7b 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -477,7 +477,7 @@ handle_bh_back:
goto move_rr_last;
move_rr_back:
- switch (prev->state) {
+ switch (prev->state & ~TASK_EXCLUSIVE) {
case TASK_INTERRUPTIBLE:
if (signal_pending(prev)) {
prev->state = TASK_RUNNING;
diff --git a/kernel/signal.c b/kernel/signal.c
index dfc65edc6..dca49b492 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -12,7 +12,6 @@
#include <linux/smp_lock.h>
#include <linux/init.h>
#include <linux/sched.h>
-#include <linux/highuid.h>
#include <asm/param.h>
#include <asm/uaccess.h>
@@ -167,7 +166,6 @@ printk("SIG dequeue (%s:%d): %d ", current->comm, current->pid,
info->si_code = 0;
info->si_pid = 0;
info->si_uid = 0;
- SET_SIGINFO_UID16(info->si_uid16, 0);
}
if (reset)
@@ -326,7 +324,6 @@ printk("SIG queue (%s:%d): %d ", t->comm, t->pid, sig);
q->info.si_code = SI_USER;
q->info.si_pid = current->pid;
q->info.si_uid = current->uid;
- SET_SIGINFO_UID16(q->info.si_uid16, current->uid);
break;
case 1:
q->info.si_signo = sig;
@@ -334,7 +331,6 @@ printk("SIG queue (%s:%d): %d ", t->comm, t->pid, sig);
q->info.si_code = SI_KERNEL;
q->info.si_pid = 0;
q->info.si_uid = 0;
- SET_SIGINFO_UID16(q->info.si_uid16, 0);
break;
default:
q->info = *info;
@@ -784,7 +780,6 @@ sys_kill(int pid, int sig)
info.si_code = SI_USER;
info.si_pid = current->pid;
info.si_uid = current->uid;
- SET_SIGINFO_UID16(info.si_uid16, current->uid);
return kill_something_info(sig, &info, pid);
}
diff --git a/kernel/sys.c b/kernel/sys.c
index cc368de01..57940edea 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -828,21 +828,16 @@ out:
return 1;
}
-/*
- * This should really be a blocking read-write lock
- * rather than a semaphore. Anybody want to implement
- * one?
- */
-DECLARE_MUTEX(uts_sem);
+DECLARE_RWSEM(uts_sem);
asmlinkage long sys_newuname(struct new_utsname * name)
{
int errno = 0;
- down(&uts_sem);
+ down_read(&uts_sem);
if (copy_to_user(name,&system_utsname,sizeof *name))
errno = -EFAULT;
- up(&uts_sem);
+ up_read(&uts_sem);
return errno;
}
@@ -854,13 +849,13 @@ asmlinkage long sys_sethostname(char *name, int len)
return -EPERM;
if (len < 0 || len > __NEW_UTS_LEN)
return -EINVAL;
- down(&uts_sem);
+ down_write(&uts_sem);
errno = -EFAULT;
if (!copy_from_user(system_utsname.nodename, name, len)) {
system_utsname.nodename[len] = 0;
errno = 0;
}
- up(&uts_sem);
+ up_write(&uts_sem);
return errno;
}
@@ -870,14 +865,14 @@ asmlinkage long sys_gethostname(char *name, int len)
if (len < 0)
return -EINVAL;
- down(&uts_sem);
+ down_read(&uts_sem);
i = 1 + strlen(system_utsname.nodename);
if (i > len)
i = len;
errno = 0;
if (copy_to_user(name, system_utsname.nodename, i))
errno = -EFAULT;
- up(&uts_sem);
+ up_read(&uts_sem);
return errno;
}
@@ -894,13 +889,13 @@ asmlinkage long sys_setdomainname(char *name, int len)
if (len < 0 || len > __NEW_UTS_LEN)
return -EINVAL;
- down(&uts_sem);
+ down_write(&uts_sem);
errno = -EFAULT;
if (!copy_from_user(system_utsname.domainname, name, len)) {
errno = 0;
system_utsname.domainname[len] = 0;
}
- up(&uts_sem);
+ up_write(&uts_sem);
return errno;
}
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index fd4970e58..50ba37060 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -43,7 +43,7 @@ extern int sysctl_overcommit_memory;
extern int max_threads;
extern int nr_queued_signals, max_queued_signals;
-/* this is needed for the proc_dointvec_minmax for overflow UID and GID */
+/* this is needed for the proc_dointvec_minmax for [fs_]overflow UID and GID */
static int maxolduid = 65535;
static int minolduid = 0;
@@ -722,9 +722,16 @@ static int proc_doutsstring(ctl_table *table, int write, struct file *filp,
void *buffer, size_t *lenp)
{
int r;
- down(&uts_sem);
- r=proc_dostring(table,write,filp,buffer,lenp);
- up(&uts_sem);
+
+ if (!write) {
+ down_read(&uts_sem);
+ r=proc_dostring(table,0,filp,buffer,lenp);
+ up_read(&uts_sem);
+ } else {
+ down_write(&uts_sem);
+ r=proc_dostring(table,1,filp,buffer,lenp);
+ up_write(&uts_sem);
+ }
return r;
}