linux-mips
[Top] [All Lists]

[PATCH] MIPS: Fix syscall_trace_enter compilation error

To: ralf@linux-mips.org
Subject: [PATCH] MIPS: Fix syscall_trace_enter compilation error
From: Tony Wu <tung7970@gmail.com>
Date: Fri, 6 Feb 2015 00:43:08 +0800
Cc: Lars Persson <larper@axis.com>, linux-mips@linux-mips.org
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=bMg60+r7xYy0HgAioOLKbhSkeihNqeh2gqCNl3tdwR0=; b=h6djuFZNTJ5E3d3MqzdtXxk4e8F0F1W2IX06eAi0nykhFs1JBss41uOMOputK04wHP 2LYAfNAegCd7n5bTOdaNwQx0OnfJ0DvB8lwc51JKxUXsE962uZoFkmluW75sUuoXrkPr 7x9IL8FuXAgWji3ipQXHTzI01KZK/rXrNThcvDjAT/THrLXbMYUpIKRnHSNRwIIEt479 efKHtTT2DltgpiaOcrrr++9UM1fEgimaqr/7LLzu8djtbEETGFs/EdWz3ro6ptCYHqT7 /PpkAw4Jdll/dvT6CyOulKi+FiY9P5Iihc2ZBfj5c2w/N9iujulZeO5Uc19mvxKLxpva VsTg==
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.23 (2014-03-12)
Commit cf6ce084 (MIPS: Fix syscall_get_nr for the syscall exit
tracing.) broke 3.13 and 3.14 stable tree due to the missing syscall
argument. So, get the syscall from regs[2] before it's trashed.

This patch should go to the 3.13 and 3.14 stable tree.

Signed-off-by: Tony Wu <tung7970@gmail.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Lars Persson <larper@axis.com>
Cc: linux-mips@linux-mips.org

diff --git a/arch/mips/kernel/ptrace.c b/arch/mips/kernel/ptrace.c
index 64e18f9..01f1413 100644
--- a/arch/mips/kernel/ptrace.c
+++ b/arch/mips/kernel/ptrace.c
@@ -799,7 +799,7 @@ asmlinkage void syscall_trace_enter(struct pt_regs *regs)
        long ret = 0;
        user_exit();
 
-       current_thread_info()->syscall = syscall;
+       current_thread_info()->syscall = regs->regs[2];
 
        /* do the secure computing check first */
        secure_computing_strict(regs->regs[2]);

<Prev in Thread] Current Thread [Next in Thread>