1
0
Fork 0
alistair23-linux/tools
Steven Rostedt (VMware) 99c014a879 ktest: Fix while loop in wait_for_input
The run_command function was changed to use the wait_for_input function to
allow having a timeout if the command to run takes too much time. There was
a bug in the wait_for_input where it could end up going into an infinite
loop. There's two issues here. One is that the return value of the sysread
wasn't used for the write (to write a proper size), and that it should
continue processing the passed in file descriptor too even if there was
input. There was no check for error, if for some reason STDIN returned an
error, the function would go into an infinite loop and never exit.

Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Fixes: 6e98d1b441 ("ktest: Add timeout to ssh command")
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
2017-03-08 10:16:17 -05:00
..
accounting tools: move accounting tool from Documentation 2016-09-23 13:07:15 -06:00
arch x86/cpufeature: Add AVX512_4VNNIW and AVX512_4FMAPS features 2016-10-19 17:37:13 +02:00
build tools build: Add feature detection for g++ 2016-10-05 19:59:35 -03:00
cgroup
firewire
gpio tools/gpio: fix gpio-event-mon header comment 2016-08-08 09:50:22 +02:00
hv Drivers: hv: utils: Check VSS daemon is listening before a hot backup 2016-09-02 17:22:51 +02:00
iio Second set of iio new device support, features and cleanups for the 4.9 cycle. 2016-09-14 20:42:03 +02:00
include tools: Synchronize tools/include/uapi/linux/bpf.h 2016-10-05 19:31:48 -03:00
kvm/kvm_stat tools: kvm_stat: Add comments 2016-05-25 16:12:06 +02:00
laptop tools: move laptops dslm tool from Documentation 2016-09-23 13:07:21 -06:00
lguest tools/lguest: Don't bork the terminal in case of wrong args 2016-09-08 08:05:24 +02:00
lib tools lib traceevent: Fix kbuffer_read_at_offset() 2016-10-05 11:36:22 -03:00
net tools: bpf_jit_disasm: check for klogctl failure 2016-05-08 23:32:59 -04:00
nfsd
objtool objtool: Fix bytes check of lea's rex_prefix 2016-12-06 09:20:59 +01:00
pcmcia tools: move pcmcia crc32hash tool from Documentation 2016-09-23 13:07:27 -06:00
perf perf hists: Fix column length on --hierarchy 2016-11-09 11:55:29 -03:00
power tools/power/acpi: Remove direct kernel source include reference 2016-11-16 22:31:26 +01:00
scripts tools build: Fix objtool build with ARCH=x86_64 2016-07-22 16:37:44 -03:00
spi Merge remote-tracking branches 'spi/topic/ti-qspi', 'spi/topic/tools', 'spi/topic/txx9' and 'spi/topic/xlp' into spi-next 2016-09-30 09:14:22 -07:00
testing ktest: Fix while loop in wait_for_input 2017-03-08 10:16:17 -05:00
thermal/tmon
time
usb usbip: adding names db to port operation 2016-05-03 14:32:07 -07:00
virtio ringtest: poll for new buffers once before updating event index 2016-10-31 00:21:43 +02:00
vm tools/vm/page_owner: increase temporary buffer size 2016-07-26 16:19:19 -07:00
Makefile tools/gpio: add install section 2016-06-23 11:07:13 +02:00