Commit 2e7fa3fb authored by Jeff Dike's avatar Jeff Dike

Applied updates from 2.5.51 and 2.5.52.

parent 8ca27771
......@@ -33,7 +33,8 @@ int sys_ptrace(long request, long pid, long addr, long data)
if (current->ptrace & PT_PTRACED)
goto out;
if((ret = security_ptrace(current->parent, current)))
ret = security_ptrace(current->parent, current);
if (ret)
goto out;
/* set the ptrace bit in the process flags. */
......
......@@ -69,6 +69,9 @@ static int handle_signal(struct pt_regs *regs, unsigned long signr,
ret = 0;
switch(error){
case -ERESTART_RESTARTBLOCK:
current_thread_info()->restart_block.fn =
do_no_restart_syscall;
case -ERESTARTNOHAND:
ret = -EINTR;
break;
......@@ -160,6 +163,10 @@ static int kern_do_signal(struct pt_regs *regs, sigset_t *oldset, int error)
PT_REGS_ORIG_SYSCALL(regs) = PT_REGS_SYSCALL_NR(regs);
PT_REGS_RESTART_SYSCALL(regs);
}
else if(PT_REGS_SYSCALL_RET(regs) == -ERESTART_RESTARTBLOCK){
PT_REGS_SYSCALL_RET(regs) = __NR_restart_syscall;
PT_REGS_RESTART_SYSCALL(regs);
}
}
/* This closes a way to execute a system call on the host. If
......
......@@ -254,7 +254,7 @@ extern syscall_handler_t um_stime;
#endif
syscall_handler_t *sys_call_table[] = {
[ 0 ] = sys_ni_syscall,
[ __NR_restart_syscall ] = sys_restart_syscall,
[ __NR_exit ] = sys_exit,
[ __NR_fork ] = sys_fork,
[ __NR_read ] = (syscall_handler_t *) sys_read,
......
......@@ -182,7 +182,11 @@ int sys_ipc (uint call, int first, int second,
switch (call) {
case SEMOP:
return sys_semop (first, (struct sembuf *)ptr, second);
return sys_semtimedop(first, (struct sembuf *) ptr, second,
NULL);
case SEMTIMEDOP:
return sys_semtimedop(first, (struct sembuf *) ptr, second,
(const struct timespec *) fifth);
case SEMGET:
return sys_semget (first, second, third);
case SEMCTL: {
......
......@@ -59,18 +59,27 @@ SECTIONS
__uml_setup_start = .;
.uml.setup.init : { *(.uml.setup.init) }
__uml_setup_end = .;
__uml_help_start = .;
.uml.help.init : { *(.uml.help.init) }
__uml_help_end = .;
__uml_postsetup_start = .;
.uml.postsetup.init : { *(.uml.postsetup.init) }
__uml_postsetup_end = .;
__setup_start = .;
.init.setup : { *(.init.setup) }
__setup_end = .;
__start___param = .;
__param : { *(__param) }
__stop___param = .;
__per_cpu_start = . ;
.data.percpu : { *(.data.percpu) }
__per_cpu_end = . ;
__per_cpu_end = . ;
__initcall_start = .;
.initcall.init : {
*(.initcall1.init)
......
......@@ -20,14 +20,9 @@ struct thread_info {
mm_segment_t addr_limit; /* thread address space:
0-0xBFFFFFFF for user
0-0xFFFFFFFF for kernel */
struct restart_block restart_block;
};
/*
* macros/functions for gaining access to the thread information structure
*
* preempt_count needs to be 1 initially, until the scheduler is functional.
*/
#define INIT_THREAD_INFO(tsk) \
{ \
task: &tsk, \
......@@ -36,6 +31,9 @@ struct thread_info {
cpu: 0, \
preempt_count: 1, \
addr_limit: KERNEL_DS, \
restart_block: { \
fn: do_no_restart_syscall, \
}, \
}
#define init_thread_info (init_thread_union.thread_info)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment