Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1264851lqe; Mon, 8 Apr 2024 04:11:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW9CuPbz7cz0p+GcJ0ic4xdy3qCDqE4YP7M6JsNzWaWfsk8paJVYma+Y8hTuecvQ6UcelV0Sgk6QuEke3upND1otuybrVy2yyRF6l19Dw== X-Google-Smtp-Source: AGHT+IHDPstFT5SiAiaZ11Pvw8UeddA/ENFP69JC1ltGqon1OzFD0aF2su/55m9SpIEY5PkbjqiM X-Received: by 2002:a05:6402:3881:b0:56d:c77b:4f0c with SMTP id fd1-20020a056402388100b0056dc77b4f0cmr8132077edb.2.1712574669194; Mon, 08 Apr 2024 04:11:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712574669; cv=pass; d=google.com; s=arc-20160816; b=A01zTbtzYn3yNmbMTWYAD0JFeGuHMc/oDG3aZgAf19gs2SV495fIaM4EitsIkhmKsd mwC2Mj+Z4RJiYDt1e480xMX4JrHCKKRvTfRbmNMY4VdpJD7136H0XN6yzlVUEXaJseBJ qztcckOfzO4AGd6coJX4hO46MrAq02+dljtVyIpyshkWsaRaZbi5BXGx9m2Mx1o6MSAK 31c8tY1QJCVKdK8nLZVpOrf+dJVlBha1v2tHACbvrGU+kJyKVaOYa6YPTIO1v9nV3+gM FJFSF0hSOw3pRu54tGBsoWEPIl7Y5aegU7Gqh3mK8yC8bkug7tB5ukwlY/O+7/IrLedg mNlQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=29uJ9uKZh26lEoOEWzDA17mJ7hgZoCxn4kZ10EeWNMs=; fh=dcrMiE0wprNn82ef616sEv+sYqi+T5YfIY07RS/2mhA=; b=GviWzie8SlrLO75vpxHyqTAX9qj/WD8P+eaUcZy5Mv4n/u/LYqvzE4kivcswkObxI1 PWhvy4cQBFxLe26ykMxS47zn+halX2b+zJBgTwNIZqAqq4NjSGoVL0sUBcUxIxhM6Ewy 9Gff6zITGTmdTpqEKONu10xL9QhK94POyR9TTdbhei2DLqDI5taZGNZa+XwBFoJf3q7I Etk5EOaEEFOfWsSyCp8N9vwwVf0vnIzQ5rezMcdgNN5FjQ/fXNPXFScQ4BmIa04NC21Y ZVfxhv9QfthD4JJHLN/DjhUCCQJYkGBGGsJnAcfXSt5R+6ddMIxdsAquI9YAiFMqu1Zu xPtQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=fintech.ru); spf=pass (google.com: domain of linux-kernel+bounces-135252-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-135252-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id e21-20020a50d4d5000000b0056c3ecbf603si3606271edj.136.2024.04.08.04.11.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Apr 2024 04:11:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-135252-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=fintech.ru); spf=pass (google.com: domain of linux-kernel+bounces-135252-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-135252-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id B966D1F225DF for ; Mon, 8 Apr 2024 11:11:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 41F7F64CEC; Mon, 8 Apr 2024 11:11:01 +0000 (UTC) Received: from exchange.fintech.ru (exchange.fintech.ru [195.54.195.159]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D9E3C33EA for ; Mon, 8 Apr 2024 11:10:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.54.195.159 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712574660; cv=none; b=luLvNJkCxMEkpFEL3zfQcpq90uFTeLdTxU8CjZcN+xa7zO+Cjrzxf+2l+rxtT2jllfpNeiLp2vHQqtpSjeCghTM9z8IJAseQNdOCJsWPjG5CuUX8gHwRVL6bj3v6UWLG5QRlnvqIlcH7mFZuwD8FeYG2098W7Ssdg2XAaPhsJ8s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712574660; c=relaxed/simple; bh=1G+Z9+nM0XWw/L5NtKeMp7Sj1L6VgoROOhpT/qNmrGQ=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=SWVz0Q2pygfnVkIr/sT3CDi3VoR/uN39ZamDkWBhz0hpM3y9bLeKRO9ALS+H6MgZHi3Q20lxp8PUMwZ2FYvj3A7lZgmX9jePwSjszkvl97hDNzVtzQsgmrR8MIAYQ2wQSu4eDuFa+CMNrIGYcUjsoYJWeKTB8+SKavhPLxaRrKU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=fintech.ru; spf=pass smtp.mailfrom=fintech.ru; arc=none smtp.client-ip=195.54.195.159 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=fintech.ru Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fintech.ru Received: from Ex16-01.fintech.ru (10.0.10.18) by exchange.fintech.ru (195.54.195.169) with Microsoft SMTP Server (TLS) id 14.3.498.0; Mon, 8 Apr 2024 14:10:53 +0300 Received: from localhost (10.0.253.138) by Ex16-01.fintech.ru (10.0.10.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Mon, 8 Apr 2024 14:10:52 +0300 From: Nikita Zhandarovich To: CC: Nikita Zhandarovich , , Subject: Re: WARNING in smsusb_start_streaming/usb_submit_urb Date: Mon, 8 Apr 2024 04:10:49 -0700 Message-ID: <20240408111049.28844-1-n.zhandarovich@fintech.ru> X-Mailer: git-send-email 2.25.1 In-Reply-To: <000000000000d529bc0590a01f5f@google.com> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: Ex16-02.fintech.ru (10.0.10.19) To Ex16-01.fintech.ru (10.0.10.18) Try fixing current endpoint checking by testing endpoint type as well. #syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git fe46a7dd189e --- drivers/media/usb/siano/smsusb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/usb/siano/smsusb.c b/drivers/media/usb/siano/smsusb.c index 723510520d09..daaac121c670 100644 --- a/drivers/media/usb/siano/smsusb.c +++ b/drivers/media/usb/siano/smsusb.c @@ -405,10 +405,10 @@ static int smsusb_init_device(struct usb_interface *intf, int board_id) struct usb_endpoint_descriptor *desc = &intf->cur_altsetting->endpoint[i].desc; - if (desc->bEndpointAddress & USB_DIR_IN) { + if (usb_endpoint_is_bulk_in(desc)) { dev->in_ep = desc->bEndpointAddress; align = usb_endpoint_maxp(desc) - sizeof(struct sms_msg_hdr); - } else { + } else if (usb_endpoint_is_bulk_out(desc)) { dev->out_ep = desc->bEndpointAddress; } }