[PATCH] new tty buffering locking fix
Change locking in the new tty buffering facility from using tty->read_lock, which is currently ignored by drivers and thus ineffective. New locking uses a new tty buffering specific lock enforced centrally in the tty buffering code. Two drivers (esp and cyclades) are updated to use the tty buffering functions instead of accessing tty buffering internals directly. This is required for the new locking to work. Minor checks for NULL buffers added to tty_prepare_flip_string/tty_prepare_flip_string_flags Signed-off-by: Paul Fulghum <paulkf@microgate.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:

committed by
Linus Torvalds

parent
546cfdf47f
commit
808249ceba
@@ -359,7 +359,7 @@ static inline void receive_chars_pio(struct esp_struct *info, int num_bytes)
|
||||
}
|
||||
}
|
||||
|
||||
schedule_delayed_work(&tty->buf.work, 1);
|
||||
tty_schedule_flip(tty);
|
||||
|
||||
info->stat_flags &= ~ESP_STAT_RX_TIMEOUT;
|
||||
release_pio_buffer(pio_buf);
|
||||
@@ -426,7 +426,7 @@ static inline void receive_chars_dma_done(struct esp_struct *info,
|
||||
}
|
||||
tty_insert_flip_char(tty, dma_buffer[num_bytes - 1], statflag);
|
||||
}
|
||||
schedule_delayed_work(&tty->buf.work, 1);
|
||||
tty_schedule_flip(tty);
|
||||
}
|
||||
|
||||
if (dma_bytes != num_bytes) {
|
||||
|
Reference in New Issue
Block a user