Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 210842
b: refs/heads/master
c: 476f771
h: refs/heads/master
v: v3
  • Loading branch information
Mika Westerberg authored and Greg Kroah-Hartman committed Sep 20, 2010
1 parent 5016c6e commit 109ba12
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 44 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ed1cde68365c1251b920900c51e73675ff38dc66
refs/heads/master: 476f771cb9b6cd4845dcd18f16a2f03a89ee63fc
51 changes: 20 additions & 31 deletions trunk/arch/frv/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,6 @@ static int restore_sigcontext(struct sigcontext __user *sc, int *_gr8)
struct user_context *user = current->thread.user;
unsigned long tbr, psr;

/* Always make any pending restarted system calls return -EINTR */
current_thread_info()->restart_block.fn = do_no_restart_syscall;

tbr = user->i.tbr;
psr = user->i.psr;
if (copy_from_user(user, &sc->sc_context, sizeof(sc->sc_context)))
Expand Down Expand Up @@ -253,8 +250,6 @@ static int setup_frame(int sig, struct k_sigaction *ka, sigset_t *set)
struct sigframe __user *frame;
int rsig;

set_fs(USER_DS);

frame = get_sigframe(ka, sizeof(*frame));

if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
Expand Down Expand Up @@ -298,23 +293,22 @@ static int setup_frame(int sig, struct k_sigaction *ka, sigset_t *set)
(unsigned long) (frame->retcode + 2));
}

/* Set up registers for the signal handler */
/* set up registers for signal handler */
__frame->sp = (unsigned long) frame;
__frame->lr = (unsigned long) &frame->retcode;
__frame->gr8 = sig;

if (current->personality & FDPIC_FUNCPTRS) {
struct fdpic_func_descriptor __user *funcptr =
(struct fdpic_func_descriptor __user *) ka->sa.sa_handler;
struct fdpic_func_descriptor desc;
if (copy_from_user(&desc, funcptr, sizeof(desc)))
goto give_sigsegv;
__frame->pc = desc.text;
__frame->gr15 = desc.GOT;
__get_user(__frame->pc, &funcptr->text);
__get_user(__frame->gr15, &funcptr->GOT);
} else {
__frame->pc = (unsigned long) ka->sa.sa_handler;
__frame->gr15 = 0;
}

__frame->sp = (unsigned long) frame;
__frame->lr = (unsigned long) &frame->retcode;
__frame->gr8 = sig;
set_fs(USER_DS);

/* the tracer may want to single-step inside the handler */
if (test_thread_flag(TIF_SINGLESTEP))
Expand All @@ -329,7 +323,7 @@ static int setup_frame(int sig, struct k_sigaction *ka, sigset_t *set)
return 0;

give_sigsegv:
force_sigsegv(sig, current);
force_sig(SIGSEGV, current);
return -EFAULT;

} /* end setup_frame() */
Expand All @@ -344,8 +338,6 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
struct rt_sigframe __user *frame;
int rsig;

set_fs(USER_DS);

frame = get_sigframe(ka, sizeof(*frame));

if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
Expand Down Expand Up @@ -400,23 +392,22 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
}

/* Set up registers for signal handler */
__frame->sp = (unsigned long) frame;
__frame->lr = (unsigned long) &frame->retcode;
__frame->gr8 = sig;
__frame->gr9 = (unsigned long) &frame->info;

if (current->personality & FDPIC_FUNCPTRS) {
struct fdpic_func_descriptor __user *funcptr =
(struct fdpic_func_descriptor __user *) ka->sa.sa_handler;
struct fdpic_func_descriptor desc;
if (copy_from_user(&desc, funcptr, sizeof(desc)))
goto give_sigsegv;
__frame->pc = desc.text;
__frame->gr15 = desc.GOT;
__get_user(__frame->pc, &funcptr->text);
__get_user(__frame->gr15, &funcptr->GOT);
} else {
__frame->pc = (unsigned long) ka->sa.sa_handler;
__frame->gr15 = 0;
}

__frame->sp = (unsigned long) frame;
__frame->lr = (unsigned long) &frame->retcode;
__frame->gr8 = sig;
__frame->gr9 = (unsigned long) &frame->info;
set_fs(USER_DS);

/* the tracer may want to single-step inside the handler */
if (test_thread_flag(TIF_SINGLESTEP))
Expand All @@ -431,7 +422,7 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
return 0;

give_sigsegv:
force_sigsegv(sig, current);
force_sig(SIGSEGV, current);
return -EFAULT;

} /* end setup_rt_frame() */
Expand All @@ -446,7 +437,7 @@ static int handle_signal(unsigned long sig, siginfo_t *info,
int ret;

/* Are we from a system call? */
if (__frame->syscallno != -1) {
if (in_syscall(__frame)) {
/* If so, check system call restarting.. */
switch (__frame->gr8) {
case -ERESTART_RESTARTBLOCK:
Expand All @@ -465,7 +456,6 @@ static int handle_signal(unsigned long sig, siginfo_t *info,
__frame->gr8 = __frame->orig_gr8;
__frame->pc -= 4;
}
__frame->syscallno = -1;
}

/* Set up the stack frame */
Expand Down Expand Up @@ -548,11 +538,10 @@ static void do_signal(void)
break;

case -ERESTART_RESTARTBLOCK:
__frame->gr7 = __NR_restart_syscall;
__frame->gr8 = __NR_restart_syscall;
__frame->pc -= 4;
break;
}
__frame->syscallno = -1;
}

/* if there's no signal to deliver, we just put the saved sigmask
Expand Down
9 changes: 2 additions & 7 deletions trunk/drivers/serial/amba-pl010.c
Original file line number Diff line number Diff line change
Expand Up @@ -472,14 +472,9 @@ pl010_set_termios(struct uart_port *port, struct ktermios *termios,
spin_unlock_irqrestore(&uap->port.lock, flags);
}

static void pl010_set_ldisc(struct uart_port *port)
static void pl010_set_ldisc(struct uart_port *port, int new)
{
int line = port->line;

if (line >= port->state->port.tty->driver->num)
return;

if (port->state->port.tty->ldisc->ops->num == N_PPS) {
if (new == N_PPS) {
port->flags |= UPF_HARDPPS_CD;
pl010_enable_ms(port);
} else
Expand Down
8 changes: 3 additions & 5 deletions trunk/mm/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -2680,12 +2680,10 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma,
delayacct_clear_flag(DELAYACCT_PF_SWAPIN);

/*
* Make sure try_to_free_swap or reuse_swap_page or swapoff did not
* release the swapcache from under us. The page pin, and pte_same
* test below, are not enough to exclude that. Even if it is still
* swapcache, we need to check that the page's swap has not changed.
* Make sure try_to_free_swap didn't release the swapcache
* from under us. The page pin isn't enough to prevent that.
*/
if (unlikely(!PageSwapCache(page) || page_private(page) != entry.val))
if (unlikely(!PageSwapCache(page)))
goto out_page;

if (ksm_might_need_to_copy(page, vma, address)) {
Expand Down

0 comments on commit 109ba12

Please sign in to comment.