From: Peter Hurley Date: Sat, 15 Jun 2013 13:14:26 +0000 (-0400) Subject: n_tty: Make N_TTY ldisc receive path lockless X-Git-Tag: v3.12-rc1~182^2~208 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d76bd2618535c581f1673047b8341fd291abc67;p=pandora-kernel.git n_tty: Make N_TTY ldisc receive path lockless n_tty has a single-producer/single-consumer input model; use lockless publish instead. Use termios_rwsem to exclude both consumer and producer while changing or resetting buffer indices, eg., when flushing. Also, claim exclusive termios_rwsem to safely retrieve the buffer indices from a thread other than consumer or producer (eg., TIOCINQ ioctl). Note the read_tail is published _after_ clearing the newline indicator in read_flags to avoid racing the producer. Drop read_lock spinlock. Signed-off-by: Peter Hurley Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed