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

Configure Feed

Select the types of activity you want to include in your feed.

usb: mdc800: handle signal and read racing

If a signal arrives after a read has partially completed,
we need to return the number of bytes read. -EINTR is correct
only if that number is zero.

Signed-off-by: Oliver Neukum <oneukum@suse.com>
Cc: stable <stable@kernel.org>
Link: https://patch.msgid.link/20260209142048.1503791-1-oneukum@suse.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Oliver Neukum and committed by
Greg Kroah-Hartman
2d6d260e 7a875c09

+1 -1
+1 -1
drivers/usb/image/mdc800.c
··· 707 707 if (signal_pending (current)) 708 708 { 709 709 mutex_unlock(&mdc800->io_lock); 710 - return -EINTR; 710 + return len == left ? -EINTR : len-left; 711 711 } 712 712 713 713 sts=left > (mdc800->out_count-mdc800->out_ptr)?mdc800->out_count-mdc800->out_ptr:left;