Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp321078ybl; Thu, 12 Dec 2019 19:08:01 -0800 (PST) X-Google-Smtp-Source: APXvYqzQJllAH/o9fcP+LbyyjgV2pfFbgADFhnkRuHXndEv+FB3jJVAXRhWPTxe9k1fu4DD+3sLZ X-Received: by 2002:a9d:6654:: with SMTP id q20mr11842910otm.284.1576206481646; Thu, 12 Dec 2019 19:08:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576206481; cv=none; d=google.com; s=arc-20160816; b=IeEDj3WnQh62KM1mVw/BCNX4FKug5TCOyX17VhnNsirCn1BGAuLbfFP+krGEY60RsQ CnsGwTH029jDZGho9u2Cu5DxTXYQdVb+OnzXylLNPP4PWR5AkcSa1UItBJ36mvUROC6L rhq5dvfPhDtQFptcpKu+bRF0JcBjejWM545wodeUbzLnNpyhy2KyHhCHGm1aAoXJpQXi WdlRkbobbQS/jtQ4pO8llguDZ6D9ZHsDfZoXmZZSISTwZ9HVjI2y09/62+SBvS3Kzwtk AGmUqpZmAOhEQw/7loEMJvNBOecgtttHnUfilRC3vYQUswL0lpxQpZrG3XfiALQz80Nv zgYQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=2Hol3+lf9Q1WEH3PYL08Klkjcqmz+i/TdTTY2wPCXu0=; b=hf4e/RfQzeBD3e6Y/cvA1ZS1vSkEpSUQx27vYu79xVgO2Ybh9eN3GQBtK45iE9uDfY QuOWmJ+4N+DvjnHT0XYGYhpmQtvGyoTKPkvC/HS+I0BEbRu7x8/rGu33KxN/A67c423v ybjNj9L3ip4d3C2kOK2eFX1ILZ03YYBtg7zscLSZhsWpxI/fGlBHuZie3W6SQSjxL4ai RAaklvtFu2h0Y2GCCYXYD1AvVMt4yRhMueSDpMol6GF1gaZcJe9SYSO1Bi9Ji55CxpNs eUql9uHhPqkx2uFs1YKomeM93ukXsRX7PsAfG9zCmIfQu/TGEU0w9HEoPBWruQbfVT8U J/oA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=sMAM+RGO; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u186si4398910oig.29.2019.12.12.19.07.48; Thu, 12 Dec 2019 19:08:01 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=sMAM+RGO; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731959AbfLMCbY (ORCPT + 99 others); Thu, 12 Dec 2019 21:31:24 -0500 Received: from mail-pg1-f194.google.com ([209.85.215.194]:43065 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731330AbfLMCbX (ORCPT ); Thu, 12 Dec 2019 21:31:23 -0500 Received: by mail-pg1-f194.google.com with SMTP id k197so742542pga.10; Thu, 12 Dec 2019 18:31:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=2Hol3+lf9Q1WEH3PYL08Klkjcqmz+i/TdTTY2wPCXu0=; b=sMAM+RGOCKNK0FCCyt24yhdbMV3xZ7fjM8uL8/Ep/w7yIKmhLlNXzCsLfYPP982Iu4 qyhEmLgFyqQqlFTbO8xwRfQZYdO9g2L3Wl6hX+VyR5AeDodKFUJjz2zULK+uQeRIyrjp wQ48LeuQzYLP/CVldDI/Bc62lqinxxHp0abwpUnA3zBDMXWom6ZWq9QnWLoORsZJBHTQ 27cUee7a6fsXqkgejAJUiWKVS97U703fQgvUBwf3vrSrpV3nuyn63Cfhqgm6nETgNWHl C78Fl0vpDZwzR8P0sl34tJ0M4DbOoN70aKjOmZ9JPypQt72ibMeT3oNcEdWs3O1QjIPw HWaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=2Hol3+lf9Q1WEH3PYL08Klkjcqmz+i/TdTTY2wPCXu0=; b=BbBjqQJyV/P/eK6/hbDPSL/kpXr8z7z8Er/f++lmAZHFCwY5Lw1Rhg7g03vwnzNJ9M E/9qlDj3a/HjVc/4jkv5LVz5Q5pLCWAVyTcLabOzO5EB3JD+AGhovgxJnhvAeADXFuaK fdbUp0v+gQTcRtYHNGf88LQf/y1H4yjohVoENTXt/FYCrmxvb/gR5kdg3M0THSfUjrwb lDuLAorP3wt9b7scyAW/u/PxL7SUbIMeDVh12Sdu86lbwEjCOdhC0knQ2XyVmw6mjmXb mmb5zWTT4NWxZymLRS4qJqyH0dh74u0UhAnY0K2ZtkeTt7ENlY/NiJO1BvmjtjphhRkL 97xw== X-Gm-Message-State: APjAAAUaGlRB6lQbxjaTvoPmGv0S2koxN0Mm6bEFlpVA+ypxmM0OVrFj 0xMLGIhGhttmyX5Vvts3ghQ= X-Received: by 2002:a63:150d:: with SMTP id v13mr4781753pgl.342.1576204282371; Thu, 12 Dec 2019 18:31:22 -0800 (PST) Received: from localhost.localdomain ([163.152.162.99]) by smtp.gmail.com with ESMTPSA id h68sm9443654pfe.162.2019.12.12.18.31.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Dec 2019 18:31:21 -0800 (PST) From: Suwan Kim To: shuah@kernel.org, valentina.manea.m@gmail.com, gregkh@linuxfoundation.org, marmarek@invisiblethingslab.com Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, stern@rowland.harvard.edu, Suwan Kim Subject: [PATCH v2 0/2] usbip: Fix infinite loop in vhci rx Date: Fri, 13 Dec 2019 11:30:53 +0900 Message-Id: <20191213023055.19933-1-suwan.kim027@gmail.com> X-Mailer: git-send-email 2.20.1 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 https://lore.kernel.org/linux-usb/20191206032406.GE1208@mail-itl/T/#u In this mail thread, it shows system hang when there is receive error in vhci. There are two different causes in this bug. [1] Wrong receive logic in vhci when using scatter-gather [2] Wrong error path of vhci_recv_ret_submit() [1] considers normal reception to be an error condition and closes connection. And when [1] error situation occurs, wrong error path[2] causes the system freeze. So each patch fixes this bugs. --- Change log Patch [1] - Add Tested-by tag Patch [2] - Add Tested-by tag - Fix typo - Fix error code in urb->status (-EPIPE->-EPROTO) Suwan Kim (2): usbip: Fix receive error in vhci-hcd when using scatter-gather usbip: Fix error path of vhci_recv_ret_submit() drivers/usb/usbip/usbip_common.c | 3 +++ drivers/usb/usbip/vhci_rx.c | 13 +++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) -- 2.20.1