From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 33DD11C5F0C; Wed, 19 Feb 2025 09:14:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739956466; cv=none; b=bAJM2LPZf/+GO7+ia9Mxq4t1JzPO8f3vn8o80xKs1QBZLQNeD+YEn7WFCux6ykgZu2RQGrzvps5fYNhuit5Q7H1/ozW0MsILipkRbMjr1sz9G22W3a0/vfqiHXlA6U5hV1UbehjicH9D82JfZ5iEt7yzeTPKbCphgSR7Y0m/g6U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739956466; c=relaxed/simple; bh=vOCEXreaK28T2h8db6a+a98KyQFFG8VqGLa5M4Rc6LM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=G8hlRsgdILNGQFybkDsadhXSq3KNb+6/jN/0DCz7/rBMYmgI7ln1mIUWLqQ9rCxRowsZEUuAr+1M8D5OuxORVAsILqkrVFktxDHM7lC0d8LbUOYH0YvJyRkWZghV4VkJsKuUKOFFfQxD/J5F+ObDwE4xIVKyr+3TRQFEa0pGuYM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=GeTaCYAt; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="GeTaCYAt" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 53DF9C4CED1; Wed, 19 Feb 2025 09:14:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1739956465; bh=vOCEXreaK28T2h8db6a+a98KyQFFG8VqGLa5M4Rc6LM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GeTaCYAt1YTS5CfMBXJVcDTwesVFfCrZhFIzRVGjXUEgvaJXU6g0uqjcnH68rYQ21 pLZEXdJQSuJNwm+LQsX09BZjDhahoP7U6QeyS2KhBMhUcRs+EcnpG6DVbVtCPcWuEj axbgXboW4VoC63NCcPbyC1S+F+r/YTjYhpEPj1gI= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Oliver Neukum , syzbot+ffba8e636870dac0e0c0@syzkaller.appspotmail.com, Sean Young , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 6.1 188/578] media: rc: iguanair: handle timeouts Date: Wed, 19 Feb 2025 09:23:12 +0100 Message-ID: <20250219082700.361174603@linuxfoundation.org> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250219082652.891560343@linuxfoundation.org> References: <20250219082652.891560343@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Oliver Neukum [ Upstream commit b98d5000c50544f14bacb248c34e5219fbe81287 ] In case of a timeout the IO must be cancelled or the next IO using the URB will fail and/or overwrite an operational URB. The automatic bisection fails because it arrives at a commit that correctly lets the test case run without an error. Signed-off-by: Oliver Neukum Fixes: e99a7cfe93fd ("[media] iguanair: reuse existing urb callback for command responses") Reported-by: syzbot+ffba8e636870dac0e0c0@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/66f5cc9a.050a0220.46d20.0004.GAE@google.com/ Tested-by: syzbot+ffba8e636870dac0e0c0@syzkaller.appspotmail.com Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/rc/iguanair.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/media/rc/iguanair.c b/drivers/media/rc/iguanair.c index 276bf3c8a8cb4..8af94246e5916 100644 --- a/drivers/media/rc/iguanair.c +++ b/drivers/media/rc/iguanair.c @@ -194,8 +194,10 @@ static int iguanair_send(struct iguanair *ir, unsigned size) if (rc) return rc; - if (wait_for_completion_timeout(&ir->completion, TIMEOUT) == 0) + if (wait_for_completion_timeout(&ir->completion, TIMEOUT) == 0) { + usb_kill_urb(ir->urb_out); return -ETIMEDOUT; + } return rc; } -- 2.39.5