Commit e355b2f5 authored by Gabriel Krisman Bertazi's avatar Gabriel Krisman Bertazi Committed by Richard Weinberger

um: ubd: Retry buffer read on any kind of error

Should bulk_req_safe_read return an error, we want to retry the read,
otherwise, even though no IO will be done, os_write_file might still end
up writing garbage to the pipe.

Cc: Martyn Welch <martyn.welch@collabora.com>
Signed-off-by: default avatarGabriel Krisman Bertazi <krisman@collabora.com>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent 6e682d53
......@@ -1592,11 +1592,11 @@ int io_thread(void *arg)
&io_remainder_size,
UBD_REQ_BUFFER_SIZE
);
if (n < 0) {
if (n == -EAGAIN) {
if (n <= 0) {
if (n == -EAGAIN)
ubd_read_poll(-1);
continue;
}
continue;
}
for (count = 0; count < n/sizeof(struct io_thread_req *); count++) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment