Skip to content

Commit c55c7a8

Browse files
btw616jmberg-intel
authored andcommitted
um: ubd: Add missing error check in start_io_thread()
The subsequent call to os_set_fd_block() overwrites the previous return value. OR the two return values together to fix it. Fixes: f88f0bd ("um: UBD Improvements") Signed-off-by: Tiwei Bie <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Johannes Berg <[email protected]>
1 parent 86731a2 commit c55c7a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/um/drivers/ubd_user.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ int start_io_thread(struct os_helper_thread **td_out, int *fd_out)
4141
*fd_out = fds[1];
4242

4343
err = os_set_fd_block(*fd_out, 0);
44-
err = os_set_fd_block(kernel_fd, 0);
44+
err |= os_set_fd_block(kernel_fd, 0);
4545
if (err) {
4646
printk("start_io_thread - failed to set nonblocking I/O.\n");
4747
goto out_close;

0 commit comments

Comments
 (0)