[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180919054653.GA32263@infradead.org>
Date: Tue, 18 Sep 2018 22:46:53 -0700
From: Christoph Hellwig <hch@...radead.org>
To: "Eric W. Biederman" <ebiederm@...ssion.com>
Cc: linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, x86@...nel.org
Subject: Re: [REVIEW][PATCH 02/20] signal/x86: Inline fill_sigtrap_info in
it's only caller send_sigtrap
>
> clear_siginfo(&info);
> - fill_sigtrap_info(tsk, regs, error_code, si_code, &info);
> + tsk->thread.trap_nr = X86_TRAP_DB;
> + tsk->thread.error_code = error_code;
> +
> + info.si_signo = SIGTRAP;
> + info.si_code = si_code;
> + info.si_addr = user_mode(regs) ? (void __user *)regs->ip : NULL;
clear_siginfo already zeroes the whole structure, so this could be
written more clearly as:
if (user_mode(regs)
info.si_addr = (void __user *)regs->ip;
Powered by blists - more mailing lists