Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: f88f0bdfc32f ("um: UBD Improvements")
Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com>
Link: https://patch.msgid.link/20250606124428.148164-2-tiwei.btw@antgroup.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

authored by

Tiwei Bie and committed by
Johannes Berg
c55c7a85 86731a2a

+1 -1
+1 -1
arch/um/drivers/ubd_user.c
··· 41 41 *fd_out = fds[1]; 42 42 43 43 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); 45 45 if (err) { 46 46 printk("start_io_thread - failed to set nonblocking I/O.\n"); 47 47 goto out_close;