From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934270AbcIOKoj (ORCPT ); Thu, 15 Sep 2016 06:44:39 -0400 Received: from terminus.zytor.com ([198.137.202.10]:38534 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933997AbcIOKng (ORCPT ); Thu, 15 Sep 2016 06:43:36 -0400 Date: Thu, 15 Sep 2016 03:42:43 -0700 From: tip-bot for Linus Torvalds Message-ID: Cc: luto@kernel.org, jann@thejh.net, bp@alien8.de, linux-kernel@vger.kernel.org, mingo@kernel.org, dvlasenk@redhat.com, peterz@infradead.org, brgerst@gmail.com, jpoimboe@redhat.com, tglx@linutronix.de, hpa@zytor.com, torvalds@linux-foundation.org Reply-To: jann@thejh.net, bp@alien8.de, luto@kernel.org, torvalds@linux-foundation.org, brgerst@gmail.com, jpoimboe@redhat.com, hpa@zytor.com, tglx@linutronix.de, peterz@infradead.org, linux-kernel@vger.kernel.org, dvlasenk@redhat.com, mingo@kernel.org In-Reply-To: <3439705d9838940cc82733a7335fa8c654c37db8.1473801993.git.luto@kernel.org> References: <3439705d9838940cc82733a7335fa8c654c37db8.1473801993.git.luto@kernel.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/asm] um/Stop conflating task_struct::stack with thread_info Git-Commit-ID: d896fa20a70c9e596438728561e058a74ed3196b X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: d896fa20a70c9e596438728561e058a74ed3196b Gitweb: http://git.kernel.org/tip/d896fa20a70c9e596438728561e058a74ed3196b Author: Linus Torvalds AuthorDate: Tue, 13 Sep 2016 14:29:23 -0700 Committer: Ingo Molnar CommitDate: Thu, 15 Sep 2016 08:25:12 +0200 um/Stop conflating task_struct::stack with thread_info thread_info may move in the future, so use the accessors. [ Andy Lutomirski wrote this changelog message and changed "task_thread_info(child)->cpu" to "task_cpu(child)". ] Signed-off-by: Linus Torvalds Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Jann Horn Cc: Josh Poimboeuf Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/3439705d9838940cc82733a7335fa8c654c37db8.1473801993.git.luto@kernel.org Signed-off-by: Ingo Molnar --- arch/x86/um/ptrace_32.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/um/ptrace_32.c b/arch/x86/um/ptrace_32.c index a7ef7b1..5766ead 100644 --- a/arch/x86/um/ptrace_32.c +++ b/arch/x86/um/ptrace_32.c @@ -194,7 +194,7 @@ int peek_user(struct task_struct *child, long addr, long data) static int get_fpregs(struct user_i387_struct __user *buf, struct task_struct *child) { - int err, n, cpu = ((struct thread_info *) child->stack)->cpu; + int err, n, cpu = task_cpu(child); struct user_i387_struct fpregs; err = save_i387_registers(userspace_pid[cpu], @@ -211,7 +211,7 @@ static int get_fpregs(struct user_i387_struct __user *buf, struct task_struct *c static int set_fpregs(struct user_i387_struct __user *buf, struct task_struct *child) { - int n, cpu = ((struct thread_info *) child->stack)->cpu; + int n, cpu = task_cpu(child); struct user_i387_struct fpregs; n = copy_from_user(&fpregs, buf, sizeof(fpregs)); @@ -224,7 +224,7 @@ static int set_fpregs(struct user_i387_struct __user *buf, struct task_struct *c static int get_fpxregs(struct user_fxsr_struct __user *buf, struct task_struct *child) { - int err, n, cpu = ((struct thread_info *) child->stack)->cpu; + int err, n, cpu = task_cpu(child); struct user_fxsr_struct fpregs; err = save_fpx_registers(userspace_pid[cpu], (unsigned long *) &fpregs); @@ -240,7 +240,7 @@ static int get_fpxregs(struct user_fxsr_struct __user *buf, struct task_struct * static int set_fpxregs(struct user_fxsr_struct __user *buf, struct task_struct *child) { - int n, cpu = ((struct thread_info *) child->stack)->cpu; + int n, cpu = task_cpu(child); struct user_fxsr_struct fpregs; n = copy_from_user(&fpregs, buf, sizeof(fpregs));