aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorRaghavendra Rao Ananta <[email protected]>2020-04-27 20:26:01 -0700
committerGreg Kroah-Hartman <[email protected]>2020-04-28 14:38:55 +0200
commite2bd1dcbe1aa34ff5570b3427c530e4332ecf0fe (patch)
tree3361ee1c002d0badb27d6064c05349d0de6d44b1 /tools/perf/scripts/python/bin
parentff62255a2a5c1228a28f2bb063646f948115a309 (diff)
tty: hvc: Fix data abort due to race in hvc_open
Potentially, hvc_open() can be called in parallel when two tasks calls open() on /dev/hvcX. In such a scenario, if the hp->ops->notifier_add() callback in the function fails, where it sets the tty->driver_data to NULL, the parallel hvc_open() can see this NULL and cause a memory abort. Hence, serialize hvc_open and check if tty->private_data is NULL before proceeding ahead. The issue can be easily reproduced by launching two tasks simultaneously that does nothing but open() and close() on /dev/hvcX. For example: $ ./simple_open_close /dev/hvc0 & ./simple_open_close /dev/hvc0 & Signed-off-by: Raghavendra Rao Ananta <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions