Re: [PATCH] n_tty: Add memory barrier to fix race condition in receive path

2014-12-30 Thread Peter Hurley
To: Greg Kroah-Hartman ; Måns Rullgård > > Cc: Christian Riesch ; Jiri Slaby > ; linux-kernel@vger.kernel.org; sta...@vger.kernel.org > Sent: Friday, November 7, 2014 8:45 AM > Subject: Re: [PATCH] n_tty: Add memory barrier to fix race condition in > receive path > > On 11/0

Re: [PATCH] n_tty: Add memory barrier to fix race condition in receive path

2014-12-30 Thread Denis Du
To: Greg Kroah-Hartman ; Måns Rullgård Cc: Christian Riesch ; Jiri Slaby ; linux-kernel@vger.kernel.org; sta...@vger.kernel.org Sent: Friday, November 7, 2014 8:45 AM Subject: Re: [PATCH] n_tty: Add memory barrier to fix race condition in receive path On 11/06/2014 05:31 PM, Greg Kroah-Hartman

Re: [PATCH] n_tty: Add memory barrier to fix race condition in receive path

2014-12-30 Thread Denis Du
] n_tty: Add memory barrier to fix race condition in receive path On 11/06/2014 05:31 PM, Greg Kroah-Hartman wrote: On Thu, Nov 06, 2014 at 10:12:54PM +, Måns Rullgård wrote: Greg Kroah-Hartman gre...@linuxfoundation.org writes: On Thu, Nov 06, 2014 at 09:38:59PM +, Måns Rullgård wrote

Re: [PATCH] n_tty: Add memory barrier to fix race condition in receive path

2014-12-30 Thread Peter Hurley
...@linuxfoundation.org; Måns Rullgård m...@mansr.com Cc: Christian Riesch christian.rie...@omicron.at; Jiri Slaby jsl...@suse.cz; linux-kernel@vger.kernel.org; sta...@vger.kernel.org Sent: Friday, November 7, 2014 8:45 AM Subject: Re: [PATCH] n_tty: Add memory barrier to fix race condition in receive path

Re: [PATCH] n_tty: Add memory barrier to fix race condition in receive path

2014-11-10 Thread Christian Riesch
Hi Måns, On Mon, Nov 10, 2014 at 10:25 AM, Måns Rullgård wrote: > Christian Riesch writes: > >> On Thu, Nov 6, 2014 at 9:56 PM, Greg Kroah-Hartman >> wrote: >>> On Thu, Nov 06, 2014 at 08:49:01PM +, Måns Rullgård wrote: Greg Kroah-Hartman writes: > On Thu, Nov 06, 2014 at

Re: [PATCH] n_tty: Add memory barrier to fix race condition in receive path

2014-11-10 Thread Måns Rullgård
Christian Riesch writes: > On Thu, Nov 6, 2014 at 9:56 PM, Greg Kroah-Hartman > wrote: >> On Thu, Nov 06, 2014 at 08:49:01PM +, Måns Rullgård wrote: >>> Greg Kroah-Hartman writes: >>> >>> > On Thu, Nov 06, 2014 at 12:39:59PM +0100, Christian Riesch wrote: >>> >> The current implementation

Re: [PATCH] n_tty: Add memory barrier to fix race condition in receive path

2014-11-10 Thread Måns Rullgård
Christian Riesch christian.rie...@omicron.at writes: On Thu, Nov 6, 2014 at 9:56 PM, Greg Kroah-Hartman gre...@linuxfoundation.org wrote: On Thu, Nov 06, 2014 at 08:49:01PM +, Måns Rullgård wrote: Greg Kroah-Hartman gre...@linuxfoundation.org writes: On Thu, Nov 06, 2014 at 12:39:59PM

Re: [PATCH] n_tty: Add memory barrier to fix race condition in receive path

2014-11-10 Thread Christian Riesch
Hi Måns, On Mon, Nov 10, 2014 at 10:25 AM, Måns Rullgård m...@mansr.com wrote: Christian Riesch christian.rie...@omicron.at writes: On Thu, Nov 6, 2014 at 9:56 PM, Greg Kroah-Hartman gre...@linuxfoundation.org wrote: On Thu, Nov 06, 2014 at 08:49:01PM +, Måns Rullgård wrote: Greg

Re: [PATCH] n_tty: Add memory barrier to fix race condition in receive path

2014-11-09 Thread Christian Riesch
On Thu, Nov 6, 2014 at 9:56 PM, Greg Kroah-Hartman wrote: > On Thu, Nov 06, 2014 at 08:49:01PM +, Måns Rullgård wrote: >> Greg Kroah-Hartman writes: >> >> > On Thu, Nov 06, 2014 at 12:39:59PM +0100, Christian Riesch wrote: >> >> The current implementation of put_tty_queue() causes a race

Re: [PATCH] n_tty: Add memory barrier to fix race condition in receive path

2014-11-09 Thread Christian Riesch
On Thu, Nov 6, 2014 at 9:56 PM, Greg Kroah-Hartman gre...@linuxfoundation.org wrote: On Thu, Nov 06, 2014 at 08:49:01PM +, Måns Rullgård wrote: Greg Kroah-Hartman gre...@linuxfoundation.org writes: On Thu, Nov 06, 2014 at 12:39:59PM +0100, Christian Riesch wrote: The current

Re: [PATCH] n_tty: Add memory barrier to fix race condition in receive path

2014-11-07 Thread Peter Hurley
On 11/06/2014 05:31 PM, Greg Kroah-Hartman wrote: > On Thu, Nov 06, 2014 at 10:12:54PM +, Måns Rullgård wrote: >> Greg Kroah-Hartman writes: >> >>> On Thu, Nov 06, 2014 at 09:38:59PM +, Måns Rullgård wrote: Greg Kroah-Hartman writes: > On Thu, Nov 06, 2014 at 09:01:36PM

Re: [PATCH] n_tty: Add memory barrier to fix race condition in receive path

2014-11-07 Thread Peter Hurley
On 11/06/2014 05:31 PM, Greg Kroah-Hartman wrote: On Thu, Nov 06, 2014 at 10:12:54PM +, Måns Rullgård wrote: Greg Kroah-Hartman gre...@linuxfoundation.org writes: On Thu, Nov 06, 2014 at 09:38:59PM +, Måns Rullgård wrote: Greg Kroah-Hartman gre...@linuxfoundation.org writes: On Thu,

Re: [PATCH] n_tty: Add memory barrier to fix race condition in receive path

2014-11-06 Thread Christian Riesch
[sent again due to stupid HTML mail problems, sorry] On Thu, Nov 6, 2014 at 11:54 PM, Måns Rullgård wrote: > Greg Kroah-Hartman writes: > >> On Thu, Nov 06, 2014 at 10:12:54PM +, Måns Rullgård wrote: >>> Greg Kroah-Hartman writes: >>> >>> > On Thu, Nov 06, 2014 at 09:38:59PM +, Måns

Re: [PATCH] n_tty: Add memory barrier to fix race condition in receive path

2014-11-06 Thread Måns Rullgård
Greg Kroah-Hartman writes: > On Thu, Nov 06, 2014 at 10:12:54PM +, Måns Rullgård wrote: >> Greg Kroah-Hartman writes: >> >> > On Thu, Nov 06, 2014 at 09:38:59PM +, Måns Rullgård wrote: >> >> Greg Kroah-Hartman writes: >> >> >> >> > On Thu, Nov 06, 2014 at 09:01:36PM +, Måns

Re: [PATCH] n_tty: Add memory barrier to fix race condition in receive path

2014-11-06 Thread Greg Kroah-Hartman
On Thu, Nov 06, 2014 at 10:12:54PM +, Måns Rullgård wrote: > Greg Kroah-Hartman writes: > > > On Thu, Nov 06, 2014 at 09:38:59PM +, Måns Rullgård wrote: > >> Greg Kroah-Hartman writes: > >> > >> > On Thu, Nov 06, 2014 at 09:01:36PM +, Måns Rullgård wrote: > >> >> Greg Kroah-Hartman

Re: [PATCH] n_tty: Add memory barrier to fix race condition in receive path

2014-11-06 Thread Måns Rullgård
Greg Kroah-Hartman writes: > On Thu, Nov 06, 2014 at 09:38:59PM +, Måns Rullgård wrote: >> Greg Kroah-Hartman writes: >> >> > On Thu, Nov 06, 2014 at 09:01:36PM +, Måns Rullgård wrote: >> >> Greg Kroah-Hartman writes: >> >> >> >> > On Thu, Nov 06, 2014 at 08:49:01PM +, Måns

Re: [PATCH] n_tty: Add memory barrier to fix race condition in receive path

2014-11-06 Thread Greg Kroah-Hartman
On Thu, Nov 06, 2014 at 09:38:59PM +, Måns Rullgård wrote: > Greg Kroah-Hartman writes: > > > On Thu, Nov 06, 2014 at 09:01:36PM +, Måns Rullgård wrote: > >> Greg Kroah-Hartman writes: > >> > >> > On Thu, Nov 06, 2014 at 08:49:01PM +, Måns Rullgård wrote: > >> >> Greg Kroah-Hartman

Re: [PATCH] n_tty: Add memory barrier to fix race condition in receive path

2014-11-06 Thread Christian Riesch
On Thu, Nov 6, 2014 at 9:56 PM, Greg Kroah-Hartman wrote: > On Thu, Nov 06, 2014 at 08:49:01PM +, Måns Rullgård wrote: >> Greg Kroah-Hartman writes: >> >> > On Thu, Nov 06, 2014 at 12:39:59PM +0100, Christian Riesch wrote: >> >> The current implementation of put_tty_queue() causes a race

Re: [PATCH] n_tty: Add memory barrier to fix race condition in receive path

2014-11-06 Thread Måns Rullgård
Greg Kroah-Hartman writes: > On Thu, Nov 06, 2014 at 09:01:36PM +, Måns Rullgård wrote: >> Greg Kroah-Hartman writes: >> >> > On Thu, Nov 06, 2014 at 08:49:01PM +, Måns Rullgård wrote: >> >> Greg Kroah-Hartman writes: >> >> >> >> > On Thu, Nov 06, 2014 at 12:39:59PM +0100, Christian

Re: [PATCH] n_tty: Add memory barrier to fix race condition in receive path

2014-11-06 Thread Greg Kroah-Hartman
On Thu, Nov 06, 2014 at 09:01:36PM +, Måns Rullgård wrote: > Greg Kroah-Hartman writes: > > > On Thu, Nov 06, 2014 at 08:49:01PM +, Måns Rullgård wrote: > >> Greg Kroah-Hartman writes: > >> > >> > On Thu, Nov 06, 2014 at 12:39:59PM +0100, Christian Riesch wrote: > >> >> The current

Re: [PATCH] n_tty: Add memory barrier to fix race condition in receive path

2014-11-06 Thread Måns Rullgård
Greg Kroah-Hartman writes: > On Thu, Nov 06, 2014 at 08:49:01PM +, Måns Rullgård wrote: >> Greg Kroah-Hartman writes: >> >> > On Thu, Nov 06, 2014 at 12:39:59PM +0100, Christian Riesch wrote: >> >> The current implementation of put_tty_queue() causes a race condition >> >> when re-arranged

Re: [PATCH] n_tty: Add memory barrier to fix race condition in receive path

2014-11-06 Thread Greg Kroah-Hartman
On Thu, Nov 06, 2014 at 08:49:01PM +, Måns Rullgård wrote: > Greg Kroah-Hartman writes: > > > On Thu, Nov 06, 2014 at 12:39:59PM +0100, Christian Riesch wrote: > >> The current implementation of put_tty_queue() causes a race condition > >> when re-arranged by the compiler. > >> > >> On my

Re: [PATCH] n_tty: Add memory barrier to fix race condition in receive path

2014-11-06 Thread Måns Rullgård
Greg Kroah-Hartman writes: > On Thu, Nov 06, 2014 at 12:39:59PM +0100, Christian Riesch wrote: >> The current implementation of put_tty_queue() causes a race condition >> when re-arranged by the compiler. >> >> On my build with gcc 4.8.3, cross-compiling for ARM, the line >> >>

Re: [PATCH] n_tty: Add memory barrier to fix race condition in receive path

2014-11-06 Thread Greg Kroah-Hartman
On Thu, Nov 06, 2014 at 12:39:59PM +0100, Christian Riesch wrote: > The current implementation of put_tty_queue() causes a race condition > when re-arranged by the compiler. > > On my build with gcc 4.8.3, cross-compiling for ARM, the line > > *read_buf_addr(ldata, ldata->read_head++) = c;

[PATCH] n_tty: Add memory barrier to fix race condition in receive path

2014-11-06 Thread Christian Riesch
The current implementation of put_tty_queue() causes a race condition when re-arranged by the compiler. On my build with gcc 4.8.3, cross-compiling for ARM, the line *read_buf_addr(ldata, ldata->read_head++) = c; was re-arranged by the compiler to something like x =

Re: [PATCH] n_tty: Add memory barrier to fix race condition in receive path

2014-11-06 Thread Greg Kroah-Hartman
On Thu, Nov 06, 2014 at 12:39:59PM +0100, Christian Riesch wrote: The current implementation of put_tty_queue() causes a race condition when re-arranged by the compiler. On my build with gcc 4.8.3, cross-compiling for ARM, the line *read_buf_addr(ldata, ldata-read_head++) = c; was

Re: [PATCH] n_tty: Add memory barrier to fix race condition in receive path

2014-11-06 Thread Måns Rullgård
Greg Kroah-Hartman gre...@linuxfoundation.org writes: On Thu, Nov 06, 2014 at 12:39:59PM +0100, Christian Riesch wrote: The current implementation of put_tty_queue() causes a race condition when re-arranged by the compiler. On my build with gcc 4.8.3, cross-compiling for ARM, the line

Re: [PATCH] n_tty: Add memory barrier to fix race condition in receive path

2014-11-06 Thread Greg Kroah-Hartman
On Thu, Nov 06, 2014 at 08:49:01PM +, Måns Rullgård wrote: Greg Kroah-Hartman gre...@linuxfoundation.org writes: On Thu, Nov 06, 2014 at 12:39:59PM +0100, Christian Riesch wrote: The current implementation of put_tty_queue() causes a race condition when re-arranged by the compiler.

Re: [PATCH] n_tty: Add memory barrier to fix race condition in receive path

2014-11-06 Thread Måns Rullgård
Greg Kroah-Hartman gre...@linuxfoundation.org writes: On Thu, Nov 06, 2014 at 08:49:01PM +, Måns Rullgård wrote: Greg Kroah-Hartman gre...@linuxfoundation.org writes: On Thu, Nov 06, 2014 at 12:39:59PM +0100, Christian Riesch wrote: The current implementation of put_tty_queue() causes

Re: [PATCH] n_tty: Add memory barrier to fix race condition in receive path

2014-11-06 Thread Greg Kroah-Hartman
On Thu, Nov 06, 2014 at 09:01:36PM +, Måns Rullgård wrote: Greg Kroah-Hartman gre...@linuxfoundation.org writes: On Thu, Nov 06, 2014 at 08:49:01PM +, Måns Rullgård wrote: Greg Kroah-Hartman gre...@linuxfoundation.org writes: On Thu, Nov 06, 2014 at 12:39:59PM +0100, Christian

Re: [PATCH] n_tty: Add memory barrier to fix race condition in receive path

2014-11-06 Thread Måns Rullgård
Greg Kroah-Hartman gre...@linuxfoundation.org writes: On Thu, Nov 06, 2014 at 09:01:36PM +, Måns Rullgård wrote: Greg Kroah-Hartman gre...@linuxfoundation.org writes: On Thu, Nov 06, 2014 at 08:49:01PM +, Måns Rullgård wrote: Greg Kroah-Hartman gre...@linuxfoundation.org writes:

Re: [PATCH] n_tty: Add memory barrier to fix race condition in receive path

2014-11-06 Thread Christian Riesch
On Thu, Nov 6, 2014 at 9:56 PM, Greg Kroah-Hartman gre...@linuxfoundation.org wrote: On Thu, Nov 06, 2014 at 08:49:01PM +, Måns Rullgård wrote: Greg Kroah-Hartman gre...@linuxfoundation.org writes: On Thu, Nov 06, 2014 at 12:39:59PM +0100, Christian Riesch wrote: The current

Re: [PATCH] n_tty: Add memory barrier to fix race condition in receive path

2014-11-06 Thread Greg Kroah-Hartman
On Thu, Nov 06, 2014 at 09:38:59PM +, Måns Rullgård wrote: Greg Kroah-Hartman gre...@linuxfoundation.org writes: On Thu, Nov 06, 2014 at 09:01:36PM +, Måns Rullgård wrote: Greg Kroah-Hartman gre...@linuxfoundation.org writes: On Thu, Nov 06, 2014 at 08:49:01PM +, Måns

Re: [PATCH] n_tty: Add memory barrier to fix race condition in receive path

2014-11-06 Thread Måns Rullgård
Greg Kroah-Hartman gre...@linuxfoundation.org writes: On Thu, Nov 06, 2014 at 09:38:59PM +, Måns Rullgård wrote: Greg Kroah-Hartman gre...@linuxfoundation.org writes: On Thu, Nov 06, 2014 at 09:01:36PM +, Måns Rullgård wrote: Greg Kroah-Hartman gre...@linuxfoundation.org writes:

Re: [PATCH] n_tty: Add memory barrier to fix race condition in receive path

2014-11-06 Thread Greg Kroah-Hartman
On Thu, Nov 06, 2014 at 10:12:54PM +, Måns Rullgård wrote: Greg Kroah-Hartman gre...@linuxfoundation.org writes: On Thu, Nov 06, 2014 at 09:38:59PM +, Måns Rullgård wrote: Greg Kroah-Hartman gre...@linuxfoundation.org writes: On Thu, Nov 06, 2014 at 09:01:36PM +, Måns

Re: [PATCH] n_tty: Add memory barrier to fix race condition in receive path

2014-11-06 Thread Måns Rullgård
Greg Kroah-Hartman gre...@linuxfoundation.org writes: On Thu, Nov 06, 2014 at 10:12:54PM +, Måns Rullgård wrote: Greg Kroah-Hartman gre...@linuxfoundation.org writes: On Thu, Nov 06, 2014 at 09:38:59PM +, Måns Rullgård wrote: Greg Kroah-Hartman gre...@linuxfoundation.org writes:

Re: [PATCH] n_tty: Add memory barrier to fix race condition in receive path

2014-11-06 Thread Christian Riesch
[sent again due to stupid HTML mail problems, sorry] On Thu, Nov 6, 2014 at 11:54 PM, Måns Rullgård m...@mansr.com wrote: Greg Kroah-Hartman gre...@linuxfoundation.org writes: On Thu, Nov 06, 2014 at 10:12:54PM +, Måns Rullgård wrote: Greg Kroah-Hartman gre...@linuxfoundation.org writes:

[PATCH] n_tty: Add memory barrier to fix race condition in receive path

2014-11-06 Thread Christian Riesch
The current implementation of put_tty_queue() causes a race condition when re-arranged by the compiler. On my build with gcc 4.8.3, cross-compiling for ARM, the line *read_buf_addr(ldata, ldata-read_head++) = c; was re-arranged by the compiler to something like x =