Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp413479ybl; Wed, 11 Dec 2019 21:29:45 -0800 (PST) X-Google-Smtp-Source: APXvYqzJuRt6pEo4iNzgKRvh+60PIUYukAz6LrVgGbo1r05hDEu3qzOxCwF5KLMP/b085ue97Aj2 X-Received: by 2002:a9d:7a4b:: with SMTP id z11mr6241116otm.46.1576128585816; Wed, 11 Dec 2019 21:29:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576128585; cv=none; d=google.com; s=arc-20160816; b=ShC84UBVFgTXVpaeum/Afmu3J45IC/nA6e5jegaN3D2JvTFHtyKzFUO+8DAk32jv3T 3VTWf+i9lm6v21PPKhgEhSTmp9ZCb2NKcqxhROF7ptqn+rIYGpTXgNZj5PoKisuBP5XE sAhPojmOLsiOlcAA5/516qNI4OLoNmKkImiJm9T43Zc1FOq5tD7Qdf7Di/5YZmFIf8JV KiDnczIgXdiyoKSEMe8r22YJMYX+0CySp29ahyj1ZGKZI+9cGuvSzw7rxwLiDtt3YFYI y5q22xqm0Ub8j17vEJ9flEyYHvpFZY4LaV3J/Wrq/jFiYuhLnDQ04tPFekp8g6yZpGBp NXHA== 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=Cg5lGbhizOwb+tnRA8SvOrnpW+A7N5IliX8lmwh9HY8=; b=YBFSNen2zxnBXYCBUOlSjSn5HYPTj4sY5nC/fwba8H4bw/6I8xWUWvuHuag4f8kfUp rxNZWOWFf8JVV8zEfVqrRUXn+kTFyyJswXpnw34QhCkNGtuAI1VMNvjUg9v4JSh0H2w1 CtNX2aeUZ4Pxm+qr/+2pVcj4kP1Km14TSotnwjn52tBIfqEmI0t4Q0hat/ezcMW7z8Hu NJubLyRcg7afGMq0oiGW7vxor8bKWKSgUcLCJ1AYeN3t+16J3OdrNlpSHGW7A1g4Yibv mZupZrGF8Xe7drsgj/NsRz0iRFGLVD78HDAH7SUUOEmiDfmAr8K2BWCeJowsc3X5jMdB EILw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=lSqx+gVR; 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 c22si3135299oth.167.2019.12.11.21.29.33; Wed, 11 Dec 2019 21:29:45 -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=lSqx+gVR; 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 S1726833AbfLLF3E (ORCPT + 99 others); Thu, 12 Dec 2019 00:29:04 -0500 Received: from mail-pg1-f196.google.com ([209.85.215.196]:40436 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725980AbfLLF3E (ORCPT ); Thu, 12 Dec 2019 00:29:04 -0500 Received: by mail-pg1-f196.google.com with SMTP id k25so526992pgt.7; Wed, 11 Dec 2019 21:29:03 -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=Cg5lGbhizOwb+tnRA8SvOrnpW+A7N5IliX8lmwh9HY8=; b=lSqx+gVRq1/ReD8YLvPh1EJX6TMuCOCw4qHrpmhLhK0gw9tBhs+ElZVzj/QCu76tsM RyQW5jdL/QR8KEfo5OydmoagfQ+4oyJIiuCmJdr/q32ecpHwBZb93WREXjjbCBz9xDov EQDAIxK9+uj1XKBf4tgrYdpH4qjoNxDap0kkFiL5I66ZPm5Xu4LdqkkkwrEtwFs2bq0M ICF8oZmZSBqo7aTjTy5C9usMsKKRMW9cFD8OaNyKgP2hK0OChOJiF5FwKhsgb+w7JA6e 976makL8lvndjiMQn17SgNLbcHPstnc7U8utbo45sj4Ym98AeMQHJsRqZ2Uw6HJpU/hk b8Fg== 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=Cg5lGbhizOwb+tnRA8SvOrnpW+A7N5IliX8lmwh9HY8=; b=ETHGPxCUzE4GPufwQyO3+1mttCajJ9IVZyGxh3ZdO0L94vAEHgp9/d4aD3OQ5MuPxQ 7PW7lo5ZADgy5GWDJforpp+nTAu9T5U76BcVtSWIdhg5YwdwjDYEnMxhbpwrmJPySSCr HLhQ/Vvx7oasulf4KP1+B8H4EB65dAnJGMm44h3jIGTErgSEFPjcNBLzxFLDBvf5zjo8 ILFRolU2wef3spE7TA8eUtI6N5gzSXqXGRTAGij8dGqXi13xPuZkfkBjc1Tjj/29C7kk OfehJUF7JCBVz5IEXey4mx5cgE2H22z+xTbWa8I3ZU1U2u5IEBAX1cG8M8C4oGbk1SgF X7zA== X-Gm-Message-State: APjAAAUV0+NionjWEvPrlzaGX1QCwgZXhyxra1Rf+vQjDLu2+JKj1VCO 9X5+roFyH5upMlrc54eSw3z8fV1e X-Received: by 2002:a63:9d07:: with SMTP id i7mr8867378pgd.344.1576128543447; Wed, 11 Dec 2019 21:29:03 -0800 (PST) Received: from localhost.localdomain ([163.152.162.99]) by smtp.gmail.com with ESMTPSA id h7sm5532289pfq.36.2019.12.11.21.29.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 21:29:02 -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, Suwan Kim Subject: [PATCH 0/2] usbip: Fix infinite loop in vhci rx Date: Thu, 12 Dec 2019 14:28:39 +0900 Message-Id: <20191212052841.6734-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 usbip: Fix infinite loop in vhci rx 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. 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