summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorOliver Neukum <oneukum@suse.com>2020-05-26 14:44:20 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-05-27 10:25:40 +0200
commit97fe809934dd2b0b37dfef3a2fc70417f485d7af (patch)
tree21bc484d7eac53ad7f5b563d77ede67faea4172a /drivers/usb
parentd19c64b3d0978e741a9b18273ff8a9b52f1a8ca0 (diff)
downloadlinux-stable-97fe809934dd2b0b37dfef3a2fc70417f485d7af.tar.gz
linux-stable-97fe809934dd2b0b37dfef3a2fc70417f485d7af.tar.bz2
linux-stable-97fe809934dd2b0b37dfef3a2fc70417f485d7af.zip
CDC-ACM: heed quirk also in error handling
If buffers are iterated over in the error case, the lower limits for quirky devices must be heeded. Signed-off-by: Oliver Neukum <oneukum@suse.com> Reported-by: Jean Rene Dawin <jdawin@math.uni-bielefeld.de> Fixes: a4e7279cd1d19 ("cdc-acm: introduce a cool down") Cc: stable <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20200526124420.22160-1-oneukum@suse.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/class/cdc-acm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index ded8d93834ca..f67088bb8218 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -584,7 +584,7 @@ static void acm_softint(struct work_struct *work)
}
if (test_and_clear_bit(ACM_ERROR_DELAY, &acm->flags)) {
- for (i = 0; i < ACM_NR; i++)
+ for (i = 0; i < acm->rx_buflimit; i++)
if (test_and_clear_bit(i, &acm->urbs_in_error_delay))
acm_submit_read_urb(acm, i, GFP_NOIO);
}