[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20160610125056.GA8005@redhat.com>
Date: Fri, 10 Jun 2016 14:50:56 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Andy Lutomirski <luto@...nel.org>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org,
Borislav Petkov <bp@...en8.de>,
Andi Kleen <andi@...stfloor.org>, stable@...r.kernel.org,
Alexander Kuleshov <kuleshovmail@...il.com>
Subject: Re: [PATCH v2] x86/traps: Don't force in_interrupt() to return true
in IST handlers
On 05/24, Andy Lutomirski wrote:
>
> void ist_enter(struct pt_regs *regs)
> {
> if (user_mode(regs)) {
> @@ -109,13 +115,7 @@ void ist_enter(struct pt_regs *regs)
> rcu_nmi_enter();
> }
>
> - /*
> - * We are atomic because we're on the IST stack; or we're on
> - * x86_32, in which case we still shouldn't schedule; or we're
> - * on x86_64 and entered from user mode, in which case we're
> - * still atomic unless ist_begin_non_atomic is called.
> - */
> - preempt_count_add(HARDIRQ_OFFSET);
> + preempt_disable();
off-topic question,
perhaps it makes sense to remove another preempt_disable/preempt_enable_no_resched
in do_int3() and do_debug() ?
They were added by d99e1bd175f4291ddb6e62b22bb5bdbe3976389a ("x86/entry/traps: Refactor
preemption and interrupt flag handling") and afaics for no reason.
Oleg.
Powered by blists - more mailing lists