aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorPeter Hurley <[email protected]>2014-10-16 15:33:27 -0400
committerGreg Kroah-Hartman <[email protected]>2014-11-05 16:34:36 -0800
commit2622d73e51acfe1dbeb21bf2299066bdead85163 (patch)
tree06f2fff030593a0d730b61cd78da5923baec8683 /tools/perf/scripts/python
parent54e8e5fcaae109f0303f52efb24f29bfac79ca86 (diff)
pty: Fix packet mode setting race
Because pty_set_pktmode() does not claim the slave's ctrl_lock to clear ->ctrl_status (to avoid unnecessary lock nesting), pty_set_pktmode() may accidentally erase new ->ctrl_status updates. For example, CPU 0 | CPU 1 pty_set_pktmode() | pty_start() spin_lock(master's ctrl_lock) | tty->packet = 1 | | if (tty->link->packet) | spin_lock(slave's ctrl_lock) | tty->ctrl_status = TIOCPKT_START tty->link->ctrl_status = 0 | Ensure the clear of ->ctrl_status occurs before packet mode is set (and observable on another cpu). Signed-off-by: Peter Hurley <[email protected]> Reviewed-by: Alan Cox <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions