diff options
author | Peter Hurley <[email protected]> | 2016-01-09 21:45:11 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2016-01-28 11:58:02 -0800 |
commit | a8f3a29718f77df3116955d100756f67fafabec0 (patch) | |
tree | 435e824fef69ff9d08e6df6baf06fde5a31c2b5e /tools/perf/scripts/python/event_analyzing_sample.py | |
parent | f557474ca3a23800dffb790846bcb121fa046c71 (diff) |
tty: Fix ioctl(FIOASYNC) on hungup file
A small race window exists which allows signal-driven async i/o to be
enabled for the tty when the file ptr has already been hungup and
signal-driven i/o has been disabled:
CPU 0 CPU 1
----- ------
ioctl_fioasync(on)
filp->f_op->fasync(on) __tty_hangup()
tty_fasync(on) tty_lock()
tty_lock() ...
. filp->f_op = &hung_up_tty_fops;
(waiting) __tty_fasync(off)
. tty_unlock()
/* gets tty lock */
/* enables FASYNC */
Check the tty has not been hungup while holding tty_lock.
Signed-off-by: Peter Hurley <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/event_analyzing_sample.py')
0 files changed, 0 insertions, 0 deletions