Messages in this thread | | | Date | Fri, 16 Jan 2015 10:55:18 -0500 | From | Peter Hurley <> | Subject | Re: [PATCH v2] n_tty: Fix unordered accesses to lockless read buffer |
| |
On 01/12/2015 08:47 PM, Peter Hurley wrote: > Add commit_head buffer index, which the producer-side publishes > after input processing in non-canon mode. This ensures the consumer-side > observes correctly-ordered writes in non-canonical mode (ie., the buffer > data is written before the buffer index is advanced). Fix consumer-side > uses of read_cnt() to use commit_head instead. > > Add required memory barriers to the tail index to guarantee > the consumer-side has completed the loads before the producer-side > begins writing new data. Open-code the producer-side receive_room() > into the i/o loop.
Hi Greg,
Please don't apply this. I've been testing a v3 series that I should be able to get to you today.
Regards, Peter Hurley
| |