[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.1910240121460.1852@nanos.tec.linutronix.de>
Date: Thu, 24 Oct 2019 01:23:59 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: Josh Poimboeuf <jpoimboe@...hat.com>
cc: LKML <linux-kernel@...r.kernel.org>, x86@...nel.org,
Peter Zijlstra <peterz@...radead.org>,
Andy Lutomirski <luto@...nel.org>,
Will Deacon <will@...nel.org>,
Paolo Bonzini <pbonzini@...hat.com>, kvm@...r.kernel.org,
linux-arch@...r.kernel.org, Mike Rapoport <rppt@...ux.ibm.com>,
Miroslav Benes <mbenes@...e.cz>
Subject: Re: [patch V2 05/17] x86/traps: Make interrupt enable/disable
symmetric in C code
On Wed, 23 Oct 2019, Josh Poimboeuf wrote:
> On Wed, Oct 23, 2019 at 02:27:10PM +0200, Thomas Gleixner wrote:
> > --- a/arch/x86/mm/fault.c
> > +++ b/arch/x86/mm/fault.c
> > @@ -1500,10 +1500,13 @@ static noinline void
> > return;
> >
> > /* Was the fault on kernel-controlled part of the address space? */
> > - if (unlikely(fault_in_kernel_space(address)))
> > + if (unlikely(fault_in_kernel_space(address))) {
> > do_kern_addr_fault(regs, hw_error_code, address);
> > - else
> > + } else {
> > do_user_addr_fault(regs, hw_error_code, address);
> > + if (regs->flags & X86_EFLAGS_IF)
> > + local_irq_disable();
> > + }
>
> The corresponding irq enable is in do_user_addr_fault(), why not do the
> disable there?
Yeah, will do. Was just as lazy as Peter and did not want to touch the
gazillion of returns. :)
Thanks,
tglx
Powered by blists - more mailing lists