From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BAE05C2D0CE for ; Sun, 29 Dec 2019 16:56:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 817FC20718 for ; Sun, 29 Dec 2019 16:56:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="xf3Q+EUG" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726597AbfL2Q45 (ORCPT ); Sun, 29 Dec 2019 11:56:57 -0500 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:41031 "EHLO wout1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726455AbfL2Q45 (ORCPT ); Sun, 29 Dec 2019 11:56:57 -0500 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id 80EFB410; Sun, 29 Dec 2019 11:56:56 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Sun, 29 Dec 2019 11:56:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=q18LxX ZEJB6VT+kys+/3Us//yTs1a4XTd0qJi6DGFUw=; b=xf3Q+EUG8ZozHVD2vyQ3cR 10E0QvlUyYRfqBmMKbCNnJQrg5ILNE92ZCcu+4TkyTNQZMGUTlBHHGQKRD2AcEXH i5nBQY3acxQW9zf57rIk6EzzqVoWLSTXed9rr605DnsoG4rMcC49g6tPiWGAfj88 JEJQbiZIh4jJxC3TTkaLs8KBtkZJaM6yyxcibrXtCe/6A7ygPEBarawelC0m8oXP cNl6edX+CNVQ2Ux4TtPkAK8+K9/70qnyyQJzALxNpWEvB05i+XHL3eCWfq8ajVJR 9K9YH9LxkOhmti4OFWFaKOIkjeMeYIVikcHKU0GHUDGASrVaspZhv/H+gQTMYU9w == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrvdeffedgleegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkfhggtggujgesghdtre ertddtjeenucfhrhhomhepofgrrhgvkhcuofgrrhgtiiihkhhofihskhhiqdfikphrvggt khhiuceomhgrrhhmrghrvghksehinhhvihhsihgslhgvthhhihhnghhslhgrsgdrtghomh eqnecuffhomhgrihhnpehkvghrnhgvlhdrohhrghenucfkphepudehuddrvddujedrvddt jedrudelnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrghrmhgrrhgvkhesihhnvhhish hisghlvghthhhinhhgshhlrggsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from mail-itl (unknown [151.217.207.19]) by mail.messagingengine.com (Postfix) with ESMTPA id 4490D3060AA8; Sun, 29 Dec 2019 11:56:55 -0500 (EST) Date: Sun, 29 Dec 2019 17:56:45 +0100 From: Marek =?utf-8?Q?Marczykowski-G=C3=B3recki?= To: gregkh@linuxfoundation.org Cc: suwan.kim027@gmail.com, skhan@linuxfoundation.org, stable@vger.kernel.org Subject: Re: FAILED: patch "[PATCH] usbip: Fix receive error in vhci-hcd when using" failed to apply to 4.4-stable tree Message-ID: <20191229165645.GG1292@mail-itl> References: <157762916119642@kroah.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="HKEL+t8MFpg/ASTE" Content-Disposition: inline In-Reply-To: <157762916119642@kroah.com> Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org --HKEL+t8MFpg/ASTE Content-Type: text/plain; protected-headers=v1; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: Re: FAILED: patch "[PATCH] usbip: Fix receive error in vhci-hcd when using" failed to apply to 4.4-stable tree On Sun, Dec 29, 2019 at 03:19:21PM +0100, gregkh@linuxfoundation.org wrote: >=20 > The patch below does not apply to the 4.4-stable tree. > If someone wants it applied there, or to any other stable or longterm > tree, then please email the backport, including the original git commit > id to . I think the bug this commit fixes (part of ea44d190764b commit) is not present in 4.4, nor 4.9 branches. In short: no need to backport it to 4.4 or 4.9 branch. > thanks, >=20 > greg k-h >=20 > ------------------ original commit in Linus's tree ------------------ >=20 > From d986294ee55d719562b20aabe15a39bf8f863415 Mon Sep 17 00:00:00 2001 > From: Suwan Kim > Date: Fri, 13 Dec 2019 11:30:54 +0900 > Subject: [PATCH] usbip: Fix receive error in vhci-hcd when using > scatter-gather > MIME-Version: 1.0 > Content-Type: text/plain; charset=3DUTF-8 > Content-Transfer-Encoding: 8bit >=20 > When vhci uses SG and receives data whose size is smaller than SG > buffer size, it tries to receive more data even if it acutally > receives all the data from the server. If then, it erroneously adds > error event and triggers connection shutdown. >=20 > vhci-hcd should check if it received all the data even if there are > more SG entries left. So, check if it receivces all the data from > the server in for_each_sg() loop. >=20 > Fixes: ea44d190764b ("usbip: Implement SG support to vhci-hcd and stub dr= iver") > Reported-by: Marek Marczykowski-G=C3=B3recki > Tested-by: Marek Marczykowski-G=C3=B3recki > Signed-off-by: Suwan Kim > Acked-by: Shuah Khan > Cc: stable > Link: https://lore.kernel.org/r/20191213023055.19933-2-suwan.kim027@gmail= =2Ecom > Signed-off-by: Greg Kroah-Hartman >=20 > diff --git a/drivers/usb/usbip/usbip_common.c b/drivers/usb/usbip/usbip_c= ommon.c > index 6532d68e8808..e4b96674c405 100644 > --- a/drivers/usb/usbip/usbip_common.c > +++ b/drivers/usb/usbip/usbip_common.c > @@ -727,6 +727,9 @@ int usbip_recv_xbuff(struct usbip_device *ud, struct = urb *urb) > =20 > copy -=3D recv; > ret +=3D recv; > + > + if (!copy) > + break; > } > =20 > if (ret !=3D size) >=20 --=20 Best Regards, Marek Marczykowski-G=C3=B3recki Invisible Things Lab A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? --HKEL+t8MFpg/ASTE Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEhrpukzGPukRmQqkK24/THMrX1ywFAl4I2s0ACgkQ24/THMrX 1yxM4gf/QVgCo0WuroMHcPuIuKrqNzYhVzOc/9ijcWPkIY6q5iaW/L/sYmzetFLK 3NW2RQTfSGJA2ZZcZo1ExdU3R8bYw4P6Q4nk+drEqFmVKqNfuJhnoCAhi+bt7dCG 1feSdbLL/nuxctLvEmCj5k14bWC5gy7dHUsDON1ZJBDGVAmYC9SwJKd1rY5MY07F 1pKuJfdqt+nGWjBtvOMzObGEBAepq73Vdj8a/kMW/cHwsnLeRfnrxpRUB99y9qJV MkteeoLXBKD5zERY7GExkuhhNkQ5XFOH8FR4YUgixblGHlZcKSGmw6xFT3UAmBWI PdmBRp3KcyREeZUwm0edURpduZDraw== =3Xna -----END PGP SIGNATURE----- --HKEL+t8MFpg/ASTE--