Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp970432rdh; Fri, 27 Oct 2023 00:20:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFcEcmW3xFMFVdghko0Pf49mSber4StuGtjHojFSD5jwFIykFWsCJeeJv48tfNsxL6v6Xkm X-Received: by 2002:a0d:e252:0:b0:5a7:e3f9:a1fb with SMTP id l79-20020a0de252000000b005a7e3f9a1fbmr2049267ywe.42.1698391241028; Fri, 27 Oct 2023 00:20:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698391241; cv=none; d=google.com; s=arc-20160816; b=KPvoHsLbkisXc8VEuvKTYikUTnDQNIHSYrBFitc6mTggplwgJXSkKuG881oGGlsDR4 jR5poE4w/0dCtaavhUAFM4ry0kGQ6I/izDJLfxoWg/3KHTOxDVeLPju+cNU7fja8h7Yf oikkemOaem1mOV6rNcrNqP9g1qUuaB5d2le2EAmGl4RjKLfRfUkGv3gd7ixPg1AsAYiC WvRt+voRB8lSzlnDs8CUNoBWDJE6gZaNX1x4CU7X0y5sApaHMKJy6gzo347SXM6u0yN0 tFHp76KmlKKUQ8vNvcehxwh9HyOh2PNv6vTy4xr2yo0F8Y3BdrNNjEuo7dULrzf/waHi fUHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=N4rOPEwbUf4rL/wNmcHLhClv2/9Js8liOqTBuvEfkBs=; fh=FjYd/zMt87V3YetEwvgGAdGtZ9QRbFv1CTGOEhqlZGI=; b=IV7ipTEJV3uwM03W8NSByVFBb97D4JHlXyXTnm+xwg8yMEaDnd2IV8FIyxjDAintXG cSokT3otpXjhPG39aEyaHoA+YMnil9aEgGI5zoEA564L/sOGNsdX3CKhPaN3efJ66J/G Z3OAlr3dH10jOFsB64JmBbWXieheGowqxQabTKLcAoZNpVY2A0+RbZH1AIruOo5QBwg5 2qUgxeEb4YutXhnZiQpCOE13HTtXZn7YkbUR0wT6ZXIujhznfSuykdHIc7NTPPPt9Oad faSvVYs4//iqL3fYh03oDCUtGLQb5Sk6dld4Wpg/vEJXxELJXijgMHCM3Udjsl5kWiV1 ysXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=HCApt18B; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id i185-20020a0dc6c2000000b005a228b5184fsi1407641ywd.400.2023.10.27.00.20.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Oct 2023 00:20:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=HCApt18B; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id AC903804390C; Fri, 27 Oct 2023 00:20:39 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345374AbjJ0HUb (ORCPT + 99 others); Fri, 27 Oct 2023 03:20:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345388AbjJ0HU0 (ORCPT ); Fri, 27 Oct 2023 03:20:26 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF15B1BC for ; Fri, 27 Oct 2023 00:20:24 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2AE88C433C9; Fri, 27 Oct 2023 07:20:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1698391224; bh=+1VcG188vscil3yQawn71OQ65c/A723bocS9yrrCz1c=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HCApt18BTSaq+UwJSvDE24O/zRl5BhFSYV0hp0DhWFPuqQ+ggNkAdm0r9ao8RZ0HU FdLC4+6X7IPteXjFX3146q0lzJ4xqwtYYA+d4j6udg1MLmH1uHW/7689vysLP0O9cN v9qN9YBoOIsCcpSliyHq8ME5KesQgjDc2Zv+m70s= Date: Fri, 27 Oct 2023 09:20:21 +0200 From: Greg Kroah-Hartman To: andrey.konovalov@linux.dev Cc: Andrey Konovalov , Alan Stern , Felipe Balbi , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/3] usb: raw-gadget: properly handle interrupted requests Message-ID: <2023102712-overhung-strum-e113@gregkh> References: <0db45b1d7cc466e3d4d1ab353f61d63c977fbbc5.1698350424.git.andreyknvl@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0db45b1d7cc466e3d4d1ab353f61d63c977fbbc5.1698350424.git.andreyknvl@gmail.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 27 Oct 2023 00:20:39 -0700 (PDT) On Thu, Oct 26, 2023 at 10:01:12PM +0200, andrey.konovalov@linux.dev wrote: > From: Andrey Konovalov > > Currently, if a USB request that was queued by Raw Gadget is interrupted > (via a signal), wait_for_completion_interruptible returns -ERESTARTSYS. > Raw Gadget then attempts to propagate this value to userspace as a return > value from its ioctls. However, when -ERESTARTSYS is returned by a syscall > handler, the kernel internally restarts the syscall. > > This doesn't allow userspace applications to interrupt requests queued by > Raw Gadget (which is required when the emulated device is asked to switch > altsettings). It also violates the implied interface of Raw Gadget that a > single ioctl must only queue a single USB request. > > Instead, make Raw Gadget do what GadgetFS does: check whether the request > was interrupted (dequeued with status == -ECONNRESET) and report -EINTR to > userspace. > > Fixes: f2c2e717642c ("usb: gadget: add raw-gadget interface") > Signed-off-by: Andrey Konovalov > --- Hi, This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him a patch that has triggered this response. He used to manually respond to these common problems, but in order to save his sanity (he kept writing the same thing over and over, yet to different people), I was created. Hopefully you will not take offence and will fix the problem in your patch and resubmit it so that it can be accepted into the Linux kernel tree. You are receiving this message because of the following common error(s) as indicated below: - You have marked a patch with a "Fixes:" tag for a commit that is in an older released kernel, yet you do not have a cc: stable line in the signed-off-by area at all, which means that the patch will not be applied to any older kernel releases. To properly fix this, please follow the documented rules in the Documentation/process/stable-kernel-rules.rst file for how to resolve this. If you wish to discuss this problem further, or you have questions about how to resolve this issue, please feel free to respond to this email and Greg will reply once he has dug out from the pending patches received from other developers. thanks, greg k-h's patch email bot