From nobody Tue Feb 10 22:18:09 2026 Received: from mail-qv1-f53.google.com (mail-qv1-f53.google.com [209.85.219.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8F0E937E31A for ; Mon, 9 Feb 2026 15:19:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770650381; cv=none; b=IKB5EraGL1+WE4wIGiP4oUioKnr973vDuE1yrGxDTxCHZ0ufO5HmgCBCS/MrEibrwIiywfmu91boE6hDPfQncBsnBnBQaw52zbKAJsXDKk4tptWID8hRBpI9sXL/zoHGQ/PHVXI4+cc8/7YordVAGjD/nlduD2p7TaDF4EO7SfI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770650381; c=relaxed/simple; bh=dJMOVBFsWwhDsWzn9HnmrxOxrlB3gMo+4dk6IbmZZbI=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=JEYJCk+oS4eI1n2B7poQk15f2zal51okSqYJnOv8C48hu0zSnh9sVU2ZVhD1u49MM2dmNBLeFNOhOku9SKakqoRKL8Snm/n9ZFC+ZH734v/qKbCNWvE7hYQ5Bq4jgQfmy8N7QEYA8UyOwkFR/Sf7NXxmfCU0wmg/PmZEiL1SB0E= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=u.northwestern.edu; spf=pass smtp.mailfrom=u.northwestern.edu; dkim=pass (2048-bit key) header.d=u-northwestern-edu.20230601.gappssmtp.com header.i=@u-northwestern-edu.20230601.gappssmtp.com header.b=NueQHCvK; arc=none smtp.client-ip=209.85.219.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=u.northwestern.edu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=u.northwestern.edu Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=u-northwestern-edu.20230601.gappssmtp.com header.i=@u-northwestern-edu.20230601.gappssmtp.com header.b="NueQHCvK" Received: by mail-qv1-f53.google.com with SMTP id 6a1803df08f44-896f8feee14so15199206d6.0 for ; Mon, 09 Feb 2026 07:19:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=u-northwestern-edu.20230601.gappssmtp.com; s=20230601; t=1770650380; x=1771255180; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=AyEFv3bCe9MwV0dVRLQLYr4hm8peyBEebtolhI62g0A=; b=NueQHCvKkUC6aI/hJbHRyMpdVXSjmMz+o6UUGjZMrtJnH6clOtb+yRv7Oujuw6wTOs yXaF7j8DYJsCUxsK0VLncycrYa/mGzCdTP1+e8Mlz3n/Wo5jKRxz3MUwMU7dNEGN+tqH vf1yNQtefUSWGz3Ee3s0bEuco1FQr45Qql7bf/Kph5VyV+yXUGO5xxduTfX15kn3SU+Z CHP8CFCOYtSRTiz7IuNiqAdfmjII5pDPV2ftmYedbhAIi9YCfAaaXJm0BPRxOqrhq5Bb ezTd21xD5xnr3bC30m8yCGPTrf8M5bmgj4l00POcrB6U5r4fgVER1V4L5l7fsSw86epQ suZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770650380; x=1771255180; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=AyEFv3bCe9MwV0dVRLQLYr4hm8peyBEebtolhI62g0A=; b=TZVBqUTM959fROGPk63ehzO86ZFOO+DQ9nsgFR+V9wyamdju1qF4JqNbsx+uN6bVlh YKeVtOFS7qgH1C4HtsQLQMovgnwjh3oZEa41fwZnUComoy8aANIajefqPuiMExrQ5tc9 JrbPpALU62CAJnejEcVvYrT0hI5sj1WHflLDFG9DuUmmprjUPlbGNIS14ZIqhbLWVQIL 7EXv9/SE65zIbybdtVwUDKqH2whZkbMGC8DkGJlY0CKVz2P0lD30cocgQfRN+0zjSlNN U9G1EGyTK4agZQoeY0rZJ/qfKijvOYs2TECdNgPuTKIgzpcwBiO/YvI8YmRacdXTPiEj HEkw== X-Forwarded-Encrypted: i=1; AJvYcCXM7QFkrGN2tWxCmfBFVoLYpLfmoc+C3iiQ3WWug1a22UyrMhFRahCFtKLjxqkti3RV93DKAxwf7UIh78M=@vger.kernel.org X-Gm-Message-State: AOJu0YywULmCtvNpTh0Yp7X54HcLnK/ssp5S26aYqatb/qHL/X86y7U9 Una9LzJXuq2w7LZw+swoGD9qs8/AzpO1pcMZm+ozyRS4loYgcrPxXabTRAzc2qX44tsDWaH7ZFV 3fqIh X-Gm-Gg: AZuq6aKq/jCJbvSFEc0cPpKb+yPVlFevhUo545Msp6KfQ4Hegi4ofno3oyQJauupN/k g0PkWYUqRgJKsGVabNQy7SW1Ijp/Egk1uqzV/AMBgA0hJw4t6t22i5cbirXF98Ii+Q2fPNkEH+F dUlmU9FaqUmym09c88BC3d31TJYmhC4Gw72aDT877pcg3khzKcFHb/W4UkuMOSYMg252jidZ9bz iD+VLcDf7mg7EKTk6SBmWrEqq7ZFSPA4QI4ZoFBrxzNXy9SbtQE47cjk7lYCY6gbyAi+BF1a+yu uFRG7RNaXI/fIUM4sWt+Cdr0Bi865EBF2C2HKI7iaPL/p5y7TM9jwQv2G+LyMG9IaSp0sf4JhwM QRdVdnABNf7JYpBNDo+z5iXw4j5qls/bAGUpaL67JvysUquPIxJLgzvGjAYb/Cc0COjBkTAZmw0 ODAQWJ/YCOZ8wiO66OwcX4k3gKmGar7bWpA4yf+wJKd1wxVC2/bmLmEkk2574K330ZObfq8l1mi Yeg394XZ9xb0axEZYC6uIDULMbudik= X-Received: by 2002:ad4:5c68:0:b0:896:f767:9669 with SMTP id 6a1803df08f44-896f76798cfmr66786486d6.10.1770650380213; Mon, 09 Feb 2026 07:19:40 -0800 (PST) Received: from security.cs.northwestern.edu (security.cs.northwestern.edu. [165.124.184.136]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-506392902f9sm77866641cf.18.2026.02.09.07.19.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Feb 2026 07:19:39 -0800 (PST) From: Ziyi Guo To: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Ziyi Guo Subject: [PATCH v2] usb: image: mdc800: kill download URB on timeout Date: Mon, 9 Feb 2026 15:19:37 +0000 Message-Id: <20260209151937.2247202-1-n7l8m4@u.northwestern.edu> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" mdc800_device_read() submits download_urb and waits for completion. If the timeout fires and the device has not responded, the function returns without killing the URB, leaving it active. A subsequent read() resubmits the same URB while it is still in-flight, triggering the WARN in usb_submit_urb(): "URB submitted while active" Check the return value of wait_event_timeout() and kill the URB if it indicates timeout, ensuring the URB is complete before its status is inspected or the URB is resubmitted. Similar to - commit 372c93131998 ("USB: yurex: fix control-URB timeout handling") - commit b98d5000c505 ("media: rc: iguanair: handle timeouts") Signed-off-by: Ziyi Guo --- v2: - Check the retval to see whether the URB completed normally or timed out. drivers/usb/image/mdc800.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/usb/image/mdc800.c b/drivers/usb/image/mdc800.c index 7b7e1554ea20..a47bac0fb04b 100644 --- a/drivers/usb/image/mdc800.c +++ b/drivers/usb/image/mdc800.c @@ -730,9 +730,11 @@ static ssize_t mdc800_device_read (struct file *file, = char __user *buf, size_t l mutex_unlock(&mdc800->io_lock); return len-left; } - wait_event_timeout(mdc800->download_wait, + retval =3D wait_event_timeout(mdc800->download_wait, mdc800->downloaded, msecs_to_jiffies(TO_DOWNLOAD_GET_READY)); + if (!retval) + usb_kill_urb(mdc800->download_urb); mdc800->downloaded =3D 0; if (mdc800->download_urb->status !=3D 0) { --=20 2.34.1