diff options
| author | Peter Hurley <[email protected]> | 2015-01-16 15:05:37 -0500 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2015-02-02 10:11:26 -0800 |
| commit | 70aca71f92ca2c111978bf676287fab5580d2598 (patch) | |
| tree | f9fc767837a07d5381f3c61e791dd02caeb754d4 /net/switchdev/switchdev.c | |
| parent | 5e28cca1539f3532cb2392710655cd3e562cee8b (diff) | |
n_tty: Fix unordered accesses to lockless read buffer
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.
Remove no-longer-referenced receive_room().
Based on work by Christian Riesch <[email protected]>
Cc: Christian Riesch <[email protected]>
Signed-off-by: Peter Hurley <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'net/switchdev/switchdev.c')
0 files changed, 0 insertions, 0 deletions