Re: [PATCH] x86, entry: Check for syscall exit work with IRQs disabled

2015-03-25 Thread Andy Lutomirski
On Wed, Mar 25, 2015 at 5:21 AM, Ingo Molnar wrote: > > * Andy Lutomirski wrote: > >> On Tue, Mar 24, 2015 at 1:08 PM, Ingo Molnar wrote: >> > >> > * Andy Lutomirski wrote: >> > >> >> We currently have a race: if we're preempted during syscall exit, we >> >> can fail to process syscall return

Re: [PATCH] x86, entry: Check for syscall exit work with IRQs disabled

2015-03-25 Thread Ingo Molnar
* Andy Lutomirski wrote: > On Tue, Mar 24, 2015 at 1:08 PM, Ingo Molnar wrote: > > > > * Andy Lutomirski wrote: > > > >> We currently have a race: if we're preempted during syscall exit, we > >> can fail to process syscall return work that is queued up while > >> we're preempted in

Re: [PATCH] x86, entry: Check for syscall exit work with IRQs disabled

2015-03-25 Thread Ingo Molnar
* Andy Lutomirski l...@amacapital.net wrote: On Tue, Mar 24, 2015 at 1:08 PM, Ingo Molnar mi...@kernel.org wrote: * Andy Lutomirski l...@kernel.org wrote: We currently have a race: if we're preempted during syscall exit, we can fail to process syscall return work that is queued up

Re: [PATCH] x86, entry: Check for syscall exit work with IRQs disabled

2015-03-25 Thread Andy Lutomirski
On Wed, Mar 25, 2015 at 5:21 AM, Ingo Molnar mi...@kernel.org wrote: * Andy Lutomirski l...@amacapital.net wrote: On Tue, Mar 24, 2015 at 1:08 PM, Ingo Molnar mi...@kernel.org wrote: * Andy Lutomirski l...@kernel.org wrote: We currently have a race: if we're preempted during syscall

Re: [PATCH] x86, entry: Check for syscall exit work with IRQs disabled

2015-03-24 Thread Andy Lutomirski
On Tue, Mar 24, 2015 at 1:08 PM, Ingo Molnar wrote: > > * Andy Lutomirski wrote: > >> We currently have a race: if we're preempted during syscall exit, we >> can fail to process syscall return work that is queued up while >> we're preempted in ret_from_sys_call after checking ti.flags. >> >> Fix

Re: [PATCH] x86, entry: Check for syscall exit work with IRQs disabled

2015-03-24 Thread Ingo Molnar
* Andy Lutomirski wrote: > We currently have a race: if we're preempted during syscall exit, we > can fail to process syscall return work that is queued up while > we're preempted in ret_from_sys_call after checking ti.flags. > > Fix it by disabling interrupts before checking ti.flags. > >

Re: [PATCH] x86, entry: Check for syscall exit work with IRQs disabled

2015-03-24 Thread Takashi Iwai
At Mon, 23 Mar 2015 12:32:54 -0700, Andy Lutomirski wrote: > > We currently have a race: if we're preempted during syscall exit, we > can fail to process syscall return work that is queued up while > we're preempted in ret_from_sys_call after checking ti.flags. > > Fix it by disabling interrupts

Re: [PATCH] x86, entry: Check for syscall exit work with IRQs disabled

2015-03-24 Thread Takashi Iwai
At Mon, 23 Mar 2015 12:32:54 -0700, Andy Lutomirski wrote: We currently have a race: if we're preempted during syscall exit, we can fail to process syscall return work that is queued up while we're preempted in ret_from_sys_call after checking ti.flags. Fix it by disabling interrupts

Re: [PATCH] x86, entry: Check for syscall exit work with IRQs disabled

2015-03-24 Thread Andy Lutomirski
On Tue, Mar 24, 2015 at 1:08 PM, Ingo Molnar mi...@kernel.org wrote: * Andy Lutomirski l...@kernel.org wrote: We currently have a race: if we're preempted during syscall exit, we can fail to process syscall return work that is queued up while we're preempted in ret_from_sys_call after

Re: [PATCH] x86, entry: Check for syscall exit work with IRQs disabled

2015-03-24 Thread Ingo Molnar
* Andy Lutomirski l...@kernel.org wrote: We currently have a race: if we're preempted during syscall exit, we can fail to process syscall return work that is queued up while we're preempted in ret_from_sys_call after checking ti.flags. Fix it by disabling interrupts before checking

Re: [PATCH] x86, entry: Check for syscall exit work with IRQs disabled

2015-03-23 Thread Andy Lutomirski
On Mon, Mar 23, 2015 at 12:27 PM, Andy Lutomirski wrote: > On Mon, Mar 23, 2015 at 12:21 PM, Denys Vlasenko wrote: >> On 03/23/2015 08:10 PM, Andy Lutomirski wrote: >>> We currently have a race: if we're preempted during syscall exit, we >>> can fail to process syscall return work that is queued

Re: [PATCH] x86, entry: Check for syscall exit work with IRQs disabled

2015-03-23 Thread Andy Lutomirski
On Mon, Mar 23, 2015 at 12:21 PM, Denys Vlasenko wrote: > On 03/23/2015 08:10 PM, Andy Lutomirski wrote: >> We currently have a race: if we're preempted during syscall exit, we >> can fail to process syscall return work that is queued up while >> we're preempted in ret_from_sys_call after

Re: [PATCH] x86, entry: Check for syscall exit work with IRQs disabled

2015-03-23 Thread Denys Vlasenko
On 03/23/2015 08:10 PM, Andy Lutomirski wrote: > We currently have a race: if we're preempted during syscall exit, we > can fail to process syscall return work that is queued up while > we're preempted in ret_from_sys_call after checking ti.flags. > > Fix it by disabling interrupts before

[PATCH] x86, entry: Check for syscall exit work with IRQs disabled

2015-03-23 Thread Andy Lutomirski
We currently have a race: if we're preempted during syscall exit, we can fail to process syscall return work that is queued up while we're preempted in ret_from_sys_call after checking ti.flags. Fix it by disabling interrupts before checking ti.flags. Fixes: 96b6352c1271 x86_64, entry: Remove

Re: [PATCH] x86, entry: Check for syscall exit work with IRQs disabled

2015-03-23 Thread Andy Lutomirski
On Mon, Mar 23, 2015 at 12:21 PM, Denys Vlasenko dvlas...@redhat.com wrote: On 03/23/2015 08:10 PM, Andy Lutomirski wrote: We currently have a race: if we're preempted during syscall exit, we can fail to process syscall return work that is queued up while we're preempted in ret_from_sys_call

Re: [PATCH] x86, entry: Check for syscall exit work with IRQs disabled

2015-03-23 Thread Andy Lutomirski
On Mon, Mar 23, 2015 at 12:27 PM, Andy Lutomirski l...@amacapital.net wrote: On Mon, Mar 23, 2015 at 12:21 PM, Denys Vlasenko dvlas...@redhat.com wrote: On 03/23/2015 08:10 PM, Andy Lutomirski wrote: We currently have a race: if we're preempted during syscall exit, we can fail to process

[PATCH] x86, entry: Check for syscall exit work with IRQs disabled

2015-03-23 Thread Andy Lutomirski
We currently have a race: if we're preempted during syscall exit, we can fail to process syscall return work that is queued up while we're preempted in ret_from_sys_call after checking ti.flags. Fix it by disabling interrupts before checking ti.flags. Fixes: 96b6352c1271 x86_64, entry: Remove

Re: [PATCH] x86, entry: Check for syscall exit work with IRQs disabled

2015-03-23 Thread Denys Vlasenko
On 03/23/2015 08:10 PM, Andy Lutomirski wrote: We currently have a race: if we're preempted during syscall exit, we can fail to process syscall return work that is queued up while we're preempted in ret_from_sys_call after checking ti.flags. Fix it by disabling interrupts before checking