Skip to content
Commit 7efec71a authored by Dmitrii Golovanov's avatar Dmitrii Golovanov Committed by Carles Cufí
Browse files

twister: Alleviate DeviceHandler serial port TOCTOU



The DeviceHandler class method monitor_serial() has time-of-check
to time-of-use (TOCTOU) race condition possible on its serial port
which might be closed and its file descriptor cleared in between
of isOpen() and is_waiting status checks.
The issue is alleviated with controlled exception handling.

Signed-off-by: default avatarDmitrii Golovanov <dmitrii.golovanov@intel.com>
parent 0d2ba9c7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment