Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp430506yba; Wed, 15 May 2019 04:00:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqxGQ9b5L/btHCaYKVtJWrC2VUBj8rXA1EsvsOikMc6BWI6r9M5tYmR+1vB0lgGwDYBzEHAT X-Received: by 2002:a63:5105:: with SMTP id f5mr27137975pgb.373.1557918029632; Wed, 15 May 2019 04:00:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557918029; cv=none; d=google.com; s=arc-20160816; b=lLcOjsTCRz2fBnAo0VCJV22J2iM7P/V8lu2JWuF2L9fOkrBQdDF7XIyY4Fe7nEza7z GAz6VvCCmENOK81CDzpfw73jdslL2a+GhuIBKsQ0guEWDC+/nCJpbmRN0ZRhPfObLvbg I+DRcyPP0FH+M9wMm9PyIymzJAT49k9GHaSWyfTCWdjaOt4j381AIc/xZqeFQf8Tc882 KvD78XdpwIXJc4H2/AGTYKpHhTEIgDppca1oeaNQpJ2hJ9E7DpOcRXRHroqLNDEHyI21 C61M76mVcY1STUTBbqbYM51NLQI+Ej9TRoMY717DGy/vAtFHs0vcRrOPQAPOedae0k1A X5nA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=BfmEilsglrQPkw9b6ha0HLR7CJROBjaXB8vjnZE/St4=; b=Q9gqyGOB76UQ/5IXWfNSs6ucqG664vqZ4aFSKWmuWOS4EZIeWqFIbMz4DF4WXDlyKE Oxsw725Ggr0LZ6QpEWkiEZtwRUVWEjzWC3Jck4WhSTEZbMO9ciZ+wMuhYmRdTZG7o50/ 92eVERbSfd7G5I6f4JNv35cob/4/ttk1XDC7/EdCuZojwKNnHjgG4JiewCuJTkP6AHUS B9tpg885TkJ9GOTgNlw6Ay8wfl+wxfEif4cl7ea9heG5NVBD4Ivk8HqDLSD7Y5bae2Vu SSSfeKCCo0TXBdq9MrqvNizi10P+es/h0MZ85FRtGbhJBpB1K2AzAzm5HHHcCDQrrjzI 7+Jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=x5pIJu+W; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s8si1787546pfm.132.2019.05.15.04.00.14; Wed, 15 May 2019 04:00:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=x5pIJu+W; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726917AbfEOK6k (ORCPT + 99 others); Wed, 15 May 2019 06:58:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:54908 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726899AbfEOK6g (ORCPT ); Wed, 15 May 2019 06:58:36 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6E35C216FD; Wed, 15 May 2019 10:58:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1557917915; bh=XbHFDS6p7UpHsE3PAgEs/qcaXGxKbFDyyumsitjBcCc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=x5pIJu+W8lunyckCToCclqidJi0SznedfF48lnNS1qqqiKdEBU0re0aPYa8e8U3LI UWoA32r3dxR/CwcOAiMTziz1gqJfv/KuWefV1OfA76jpoSW2RXvaTcMmjv6qOb7ZQH Vy4W1IuusYxr3ofC/iyOmQpJKBk16+DjQVxrVeYM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alan Stern , Guido Kiener , Felipe Balbi , "Sasha Levin (Microsoft)" Subject: [PATCH 3.18 16/86] usb: gadget: net2272: Fix net2272_dequeue() Date: Wed, 15 May 2019 12:54:53 +0200 Message-Id: <20190515090645.846966532@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190515090642.339346723@linuxfoundation.org> References: <20190515090642.339346723@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 091dacc3cc10979ab0422f0a9f7fcc27eee97e69 ] Restore the status of ep->stopped in function net2272_dequeue(). When the given request is not found in the endpoint queue the function returns -EINVAL without restoring the state of ep->stopped. Thus the endpoint keeps blocked and does not transfer any data anymore. This fix is only compile-tested, since we do not have a corresponding hardware. An analogous fix was tested in the sibling driver. See "usb: gadget: net2280: Fix net2280_dequeue()" Acked-by: Alan Stern Signed-off-by: Guido Kiener Signed-off-by: Felipe Balbi Signed-off-by: Sasha Levin (Microsoft) --- drivers/usb/gadget/udc/net2272.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/gadget/udc/net2272.c b/drivers/usb/gadget/udc/net2272.c index 4b2444e75840..83d0544338ca 100644 --- a/drivers/usb/gadget/udc/net2272.c +++ b/drivers/usb/gadget/udc/net2272.c @@ -962,6 +962,7 @@ net2272_dequeue(struct usb_ep *_ep, struct usb_request *_req) break; } if (&req->req != _req) { + ep->stopped = stopped; spin_unlock_irqrestore(&ep->dev->lock, flags); return -EINVAL; } -- 2.19.1