Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml
Pull UML updates from Richard Weinberger: "Most changes are bug fixes and cleanups" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml: um: missing checks of __put_user()/__get_user() return values um: stub_rt_sigsuspend isn't needed these days anymore um/x86: merge (and trim) 32- and 64-bit variants of ptrace.h irq: Remove irq_chip->release() um: Remove CONFIG_IRQ_RELEASE_METHOD um: Remove usage of irq_chip->release() um: Implement um_free_irq() um: Fix __swp_type() um: Implement a custom pte_same() function um: Add BUG() to do_ops()'s error path um: Remove unused variables um: bury unused _TIF_RESTORE_SIGMASK um: wrong sigmask saved in case of multiple sigframes um: add TIF_NOTIFY_RESUME um: ->restart_block.fn needs to be reset on sigreturn
This commit is contained in:
@ -297,6 +297,13 @@ unsigned int do_IRQ(int irq, struct uml_pt_regs *regs)
|
||||
return 1;
|
||||
}
|
||||
|
||||
void um_free_irq(unsigned int irq, void *dev)
|
||||
{
|
||||
free_irq_by_irq_and_dev(irq, dev);
|
||||
free_irq(irq, dev);
|
||||
}
|
||||
EXPORT_SYMBOL(um_free_irq);
|
||||
|
||||
int um_request_irq(unsigned int irq, int fd, int type,
|
||||
irq_handler_t handler,
|
||||
unsigned long irqflags, const char * devname,
|
||||
@ -327,7 +334,6 @@ static void dummy(struct irq_data *d)
|
||||
/* This is used for everything else than the timer. */
|
||||
static struct irq_chip normal_irq_type = {
|
||||
.name = "SIGIO",
|
||||
.release = free_irq_by_irq_and_dev,
|
||||
.irq_disable = dummy,
|
||||
.irq_enable = dummy,
|
||||
.irq_ack = dummy,
|
||||
@ -335,7 +341,6 @@ static struct irq_chip normal_irq_type = {
|
||||
|
||||
static struct irq_chip SIGVTALRM_irq_type = {
|
||||
.name = "SIGVTALRM",
|
||||
.release = free_irq_by_irq_and_dev,
|
||||
.irq_disable = dummy,
|
||||
.irq_enable = dummy,
|
||||
.irq_ack = dummy,
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include <linux/seq_file.h>
|
||||
#include <linux/tick.h>
|
||||
#include <linux/threads.h>
|
||||
#include <linux/tracehook.h>
|
||||
#include <asm/current.h>
|
||||
#include <asm/pgtable.h>
|
||||
#include <asm/mmu_context.h>
|
||||
@ -114,8 +115,13 @@ void interrupt_end(void)
|
||||
{
|
||||
if (need_resched())
|
||||
schedule();
|
||||
if (test_tsk_thread_flag(current, TIF_SIGPENDING))
|
||||
if (test_thread_flag(TIF_SIGPENDING))
|
||||
do_signal();
|
||||
if (test_and_clear_thread_flag(TIF_NOTIFY_RESUME)) {
|
||||
tracehook_notify_resume(¤t->thread.regs);
|
||||
if (current->replacement_session_keyring)
|
||||
key_replace_session_keyring();
|
||||
}
|
||||
}
|
||||
|
||||
void exit_thread(void)
|
||||
@ -190,7 +196,7 @@ int copy_thread(unsigned long clone_flags, unsigned long sp,
|
||||
if (current->thread.forking) {
|
||||
memcpy(&p->thread.regs.regs, ®s->regs,
|
||||
sizeof(p->thread.regs.regs));
|
||||
REGS_SET_SYSCALL_RETURN(p->thread.regs.regs.gp, 0);
|
||||
UPT_SET_SYSCALL_RETURN(&p->thread.regs.regs, 0);
|
||||
if (sp != 0)
|
||||
REGS_SP(p->thread.regs.regs.gp) = sp;
|
||||
|
||||
|
@ -29,9 +29,6 @@ static int handle_signal(struct pt_regs *regs, unsigned long signr,
|
||||
unsigned long sp;
|
||||
int err;
|
||||
|
||||
/* Always make any pending restarted system calls return -EINTR */
|
||||
current_thread_info()->restart_block.fn = do_no_restart_syscall;
|
||||
|
||||
/* Did we come from a system call? */
|
||||
if (PT_REGS_SYSCALL_NR(regs) >= 0) {
|
||||
/* If so, check system call restarting.. */
|
||||
@ -77,15 +74,14 @@ static int kern_do_signal(struct pt_regs *regs)
|
||||
{
|
||||
struct k_sigaction ka_copy;
|
||||
siginfo_t info;
|
||||
sigset_t *oldset;
|
||||
int sig, handled_sig = 0;
|
||||
|
||||
if (test_thread_flag(TIF_RESTORE_SIGMASK))
|
||||
oldset = ¤t->saved_sigmask;
|
||||
else
|
||||
oldset = ¤t->blocked;
|
||||
|
||||
while ((sig = get_signal_to_deliver(&info, &ka_copy, regs, NULL)) > 0) {
|
||||
sigset_t *oldset;
|
||||
if (test_thread_flag(TIF_RESTORE_SIGMASK))
|
||||
oldset = ¤t->saved_sigmask;
|
||||
else
|
||||
oldset = ¤t->blocked;
|
||||
handled_sig = 1;
|
||||
/* Whee! Actually deliver the signal. */
|
||||
if (!handle_signal(regs, sig, &ka_copy, &info, oldset)) {
|
||||
|
@ -34,7 +34,7 @@ void handle_syscall(struct uml_pt_regs *r)
|
||||
result = -ENOSYS;
|
||||
else result = EXECUTE_SYSCALL(syscall, regs);
|
||||
|
||||
REGS_SET_SYSCALL_RETURN(r->gp, result);
|
||||
UPT_SET_SYSCALL_RETURN(r, result);
|
||||
|
||||
syscall_trace(r, 1);
|
||||
}
|
||||
|
@ -75,6 +75,7 @@ static int do_ops(struct host_vm_change *hvc, int end,
|
||||
default:
|
||||
printk(KERN_ERR "Unknown op type %d in do_ops\n",
|
||||
op->type);
|
||||
BUG();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user