Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1419361

Re: [PATCH v2] x86/traps: Don't force in_interrupt() to return true in IST handlers

From Oleg Nesterov <oleg@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2] x86/traps: Don't force in_interrupt() to return true in IST handlers
Date 2016-06-10 15:00 +0200
Message-ID <rIucy-4Ga-23@gated-at.bofh.it> (permalink)
References <rCtsR-Yb-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH v2] x86/traps: Don't force in_interrupt() to return true  in IST handlers Oleg Nesterov <oleg@redhat.com> - 2016-06-10 15:00 +0200

csiph-web