pty: Don't claim slave's ctrl_lock for master's packet mode
authorPeter Hurley <peter@hurleysoftware.com>
Thu, 16 Oct 2014 19:33:26 +0000 (15:33 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Nov 2014 00:34:36 +0000 (16:34 -0800)
commit54e8e5fcaae109f0303f52efb24f29bfac79ca86
treed0d4e39526384367fa195b61a5aa2de686170a7d
parent6054c16e80318d32ee084a0f5620a863ae8cea33
pty: Don't claim slave's ctrl_lock for master's packet mode

The slave's ctrl_lock serializes updates to the ctrl_status field
only, whereas the master's ctrl_lock serializes updates to the
packet mode enable (ie., the master does not have ctrl_status and
the slave does not have packet mode). Thus, claiming the slave's
ctrl_lock to access ->packet is useless.

Unlocked reads of ->packet are already smp-safe.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Reviewed-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/n_tty.c
drivers/tty/pty.c