From patchwork Fri Oct 28 20:56:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dexuan Cui X-Patchwork-Id: 12555 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1040015wru; Fri, 28 Oct 2022 14:00:47 -0700 (PDT) X-Google-Smtp-Source: AMsMyM72IxDKiz0NAyfL62LXO2ScMv8N4IksdcH2/1X/gE1z71QDtrfbvVHFirQtTf8eMabSXQCx X-Received: by 2002:a05:6402:ea0:b0:454:38bf:aa3d with SMTP id h32-20020a0564020ea000b0045438bfaa3dmr1274809eda.291.1666990847122; Fri, 28 Oct 2022 14:00:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1666990847; cv=pass; d=google.com; s=arc-20160816; b=B5NfptMc5pzPIzYGvVweEFPYZPGhcaeoK+jzqy2cU0DDVwRr0TMS3e1WRd2xWVokKB P3DIi/N+k8ayjprPPSbXVYZn1YGoCW6+u0DYQ7T9IjiqwvZvdNqehLKU+p1M0VP7V+T3 Jn0Z07R5jFzQVp7DyJ0NsmuT+Qs22lW6uNz559Jjcy10c4sqVc3Zr4ZhzbgUrvrMrScX S14C5wsfUt80KONqe+26f5+uBJ7JLcp/iSYtX9xacG44eY4cJzANjvKZkFKaEkWCo1tS 4/OdEZxfMGhLQUBuQCrwpYj5RAwrKZA8Ka7Xq1QR4T3035WylxiE6EWQIUGCY5Yt7y8s M+3g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:reply-to:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=EZThoebMZbhM4eHlZN+9VDH81cPFQo81k6w8AV9KlOs=; b=mu0QBhlcfVhSrugPRsZzRIDOlrAZ6/TY8mwInuFFblR/llsfxiZU9VxqWcyoqW5TTq TwQlJhukbYbmNTzYGSzIRMjdwA3iwblwH8E2nK0nkBQ1S6Bsq9og5lsAq3mtDH+Xem6A NuXI3L1rRGv082fLEAAg4zlbYapN8982z0G7wS+ZKOPMT1jHMnGHdg7vbvJTXVBIsT+s APG8lV2L8BF4TpEP2RhbTsh65Iyk17I0Ry7xZ1DSicWx0F28Xk2PeJ1DxhbIDamgGP5z wpArUFsLwEXBQsx6qojxLDcDnisp6T2N1kMg4JbcDrN/TXPxOKv5lU/ju1VVpQxSX9FG tygQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector2 header.b=ElkzgMMu; arc=pass (i=1 spf=pass spfdomain=microsoft.com dkim=pass dkdomain=microsoft.com dmarc=pass fromdomain=microsoft.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nc37-20020a1709071c2500b00779c6c57dbfsi6463432ejc.556.2022.10.28.14.00.23; Fri, 28 Oct 2022 14:00:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector2 header.b=ElkzgMMu; arc=pass (i=1 spf=pass spfdomain=microsoft.com dkim=pass dkdomain=microsoft.com dmarc=pass fromdomain=microsoft.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230015AbiJ1U6B (ORCPT + 99 others); Fri, 28 Oct 2022 16:58:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229553AbiJ1U5n (ORCPT ); Fri, 28 Oct 2022 16:57:43 -0400 Received: from na01-obe.outbound.protection.outlook.com (mail-eastusazon11021025.outbound.protection.outlook.com [52.101.52.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7C4C67061; Fri, 28 Oct 2022 13:57:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l0pbNul/QEHC7RX5pyWBB6bXJva1B2nR0uSZ+/Gzv1v1lcmUPMjgCMuqdCvJTLfVteNV6z+IBWuY+7A0p3Y5+pTZ5Cf4/YjbZLvvB86iY30s5isXh7u/kJGFN+V5MUWlfr9QF6H5QAK+cavuc9ns9EPSKx5GgdeL1qj7dZ4ZQD/DoGXvrwZYOaD8lxCKJgMwth8MZE+tYyQ+LoKUCHc3iXIIDfPYCpWznf1avu2jYzkNPZOW31JlUTqwsuUzxQcSemxV2z4KwDBJu0SYG/Dn9L4AXucqa35VsE4uYmWlKgBiWDfUxRTUAkgOfUN/T0ewNiLgM9hhbKOfMxdLmsFKvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=EZThoebMZbhM4eHlZN+9VDH81cPFQo81k6w8AV9KlOs=; b=G4iSPzPhPbtmh8wUEnSoS8Xld5AzT2tas2SX787dzmxLBRcLzWpsv+54LmyLnIrQuGRBvRqDKLRVVKAU/ZtANu87kKbTEKzCf4WLML+MtigovGosJvmNbJbFktoKjlALo8rGkm3AALHONu7/chEvcbISrRSKadbnyHUy48fyk5IMF3h6LprM2knMz+jS2C3MxENKduA+VK66e5UiXn+hQVcHntsMoNLVXgw2ZHJJelvsXz8bzXR1NGXBvoi/KPXzQkKnT3cDpN6UzEfoKtAQTfHLSta5FiWaJa2cymXDJZjE6aPI3kemv1tK84M4f/fvUaMYQu5EP4VThsV6655opQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=EZThoebMZbhM4eHlZN+9VDH81cPFQo81k6w8AV9KlOs=; b=ElkzgMMuf/1GF0CmD6vNg1/wqCrgLJERFMBelB+kKfq8U14478n/71s+zwphr+umoy6Ri5ba/f6Uxvtv+pQHztRYdw6/PnubpEExwJhQYoKRxDyY8/kVWvPDwyFT8jycJ4oIm7lruBbkdrJxIHM5epJTwvipp/4fE8KSVRcIMv8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=microsoft.com; Received: from BL0PR2101MB1092.namprd21.prod.outlook.com (2603:10b6:207:30::23) by PH0PR21MB1912.namprd21.prod.outlook.com (2603:10b6:510:d::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.9; Fri, 28 Oct 2022 20:57:31 +0000 Received: from BL0PR2101MB1092.namprd21.prod.outlook.com ([fe80::a746:e3bf:9f88:152f]) by BL0PR2101MB1092.namprd21.prod.outlook.com ([fe80::a746:e3bf:9f88:152f%8]) with mapi id 15.20.5791.010; Fri, 28 Oct 2022 20:57:31 +0000 From: Dexuan Cui To: sgarzare@redhat.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, arseny.krasnov@kaspersky.com, netdev@vger.kernel.org Cc: virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, kys@microsoft.com, haiyangz@microsoft.com, stephen@networkplumber.org, wei.liu@kernel.org, linux-hyperv@vger.kernel.org, Dexuan Cui Subject: [PATCH 1/2] vsock: remove the unused 'wait' in vsock_connectible_recvmsg() Date: Fri, 28 Oct 2022 13:56:45 -0700 Message-Id: <20221028205646.28084-2-decui@microsoft.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20221028205646.28084-1-decui@microsoft.com> References: <20221028205646.28084-1-decui@microsoft.com> Reply-To: decui@microsoft.com X-ClientProxiedBy: MW4P223CA0022.NAMP223.PROD.OUTLOOK.COM (2603:10b6:303:80::27) To BL0PR2101MB1092.namprd21.prod.outlook.com (2603:10b6:207:30::23) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL0PR2101MB1092:EE_|PH0PR21MB1912:EE_ X-MS-Office365-Filtering-Correlation-Id: d40166e8-f677-43e1-383a-08dab92707a3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: GvQtBA4HfMln2+/7fTiMuTXNR0sWS1iFu635AzLchWZDd4GCxTC0z+3CTXPD/NBrF81P9HEi9GzIhU+DdWKE60+r6Kth3+n0XTyIcCDRhUnhlbI9u9y2GE9YCS6ZuuHDtCvjMcUyR0nUFLSoiXTCyTv4Fd0vyAlPPPSHvwH0ymjHqA/IUveHtNoVMRFswnpXawsUxJfNTnYRkvfy8r/1UnFwLsgcHEkviIKt4YpFZJOxwGLi22qXBlnOHmchKyF/2ycH7Do2U4YBChxfkszBEVuX0ZpdWwGrp2FJ392nRrisWnICyU+TQ9sIFokqHeV+K032qA3sMIH7i2UFLzgUNZgw/uP4HcGRRTRE/TT+XYhtXTWhD4czkBW4dluEbg16DE+PlM2htyWkOLIvsLBN+feaqme6ovtKu3uOJlO6OaE4yestKPFGTFNwinXUpsymiJFz4LYnhQGljM+Nd8EtlDTb15Lp07HTbXu+dLOWLI8C9AKo8MDFNbfrQmgjIjwXqJ0UAYpTXzhGPPonJdMP9R1eXHRyc19RyRVeZ1DIJEFdTKteddtVSYhcVF2hMRC6cahrCE4oc1TSHUwBgUV0dQF726pWPtzO6cIezpsRHDHBGOdgjuDWi+GhceThCwJTecCTwI95hF7ivmsR3Jsb0KAb+SXC6tSkg1iwkJA/zui2crjTrAsmJVBoSmxeZOtG7g3/WuMuDQZuCIPNtVMHLEWPjFzqEPirrFaPF85LrmtTIB3rRZLG94nx8ZBVxCbM X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BL0PR2101MB1092.namprd21.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(396003)(136003)(39860400002)(376002)(346002)(366004)(451199015)(6666004)(107886003)(52116002)(6506007)(82950400001)(8676002)(4326008)(7416002)(2906002)(3450700001)(66556008)(5660300002)(82960400001)(38100700002)(1076003)(41300700001)(86362001)(6512007)(66476007)(66946007)(316002)(36756003)(2616005)(186003)(83380400001)(6486002)(10290500003)(4744005)(478600001)(8936002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: EKLr3U88AvUzH6dbtJerAJAw0dCuyDKUYdUlqIqqQGaqnEQrrD7RVSc/WomPtLMjDEOgCFteuSq21GcotQKUWIUQTkT/MTuaQRZv96qVDeQEgLYL0etcB6rL2mVSwSBlVB9b9bRkJPewVsnoVzOiYjBSanZjCPvxtuOO64KZGAZ9P135iK+QgM5hAtn8P8eiC1Jzc/C2rMY8JLg2es2yOF7bs6WOYpIVwSHSV0xtgji0zq9Osq0LgPoX731/OmaP0h0tR+ZIF/R1aA26R+3yzyRrlpnckqQvwNtgwIn1bskPhtV6cqcpaUJNFigoQNS8fplBVT/QqnzbNtQ8iQRggwy1Z38SlkjKOJhBmS5Dm+TYgHMMH3Krp3lpX3J4hW4gbwfkyJF6MxzqGC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A549QTbnsqorPUN3phE9Xf42upj9XcuQA64rnLQYO73tYYx1DBUNeoBHkx6jsAgk6uiGZrdLeBekUtDNLtV3UXbvL++5uUNH17cAjAASt8+48ntxBUp73qQ4/o1Tzh14Tp+Tc6J7aVb0w4W75MjWzHVZLWMJdDYjUBfhCLkjVZTThCo2rbChytyyGpqx X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: d40166e8-f677-43e1-383a-08dab92707a3 X-MS-Exchange-CrossTenant-AuthSource: BL0PR2101MB1092.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2022 20:57:31.3565 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: TsiQdR/LfoAn4kT1sKjIKfDa9PGNVGk1wkX6vuVXOHWZI154hjOBG5nYEzMYYu9tr4oESMHXActN9u9XMOcbsA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR21MB1912 X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_NONE autolearn=no 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747966594454922827?= X-GMAIL-MSGID: =?utf-8?q?1747966594454922827?= Remove the unused variable introduced by 19c1b90e1979. Fixes: 19c1b90e1979 ("af_vsock: separate receive data loop") Signed-off-by: Dexuan Cui Reviewed-by: Stefano Garzarella --- net/vmw_vsock/af_vsock.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c index ee418701cdee..d258fd43092e 100644 --- a/net/vmw_vsock/af_vsock.c +++ b/net/vmw_vsock/af_vsock.c @@ -2092,8 +2092,6 @@ vsock_connectible_recvmsg(struct socket *sock, struct msghdr *msg, size_t len, const struct vsock_transport *transport; int err; - DEFINE_WAIT(wait); - sk = sock->sk; vsk = vsock_sk(sk); err = 0; From patchwork Fri Oct 28 20:56:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dexuan Cui X-Patchwork-Id: 12556 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1040562wru; Fri, 28 Oct 2022 14:01:50 -0700 (PDT) X-Google-Smtp-Source: AMsMyM59twFLf2vR9DcrwGhvXRIek4xlwSWKB2wt1AA0Q9DWLlm/ESk9UJCQutx5ihhgF7tGUQXL X-Received: by 2002:a05:6402:26c6:b0:45d:374b:fb73 with SMTP id x6-20020a05640226c600b0045d374bfb73mr1272679edd.424.1666990909931; Fri, 28 Oct 2022 14:01:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1666990909; cv=pass; d=google.com; s=arc-20160816; b=mhk42vRDsrolWNmMuPF+TGRjcy0tzl8O8Xo3mVhsIG6O/O+/N4x157GV2566cY1mDg AhRMcQAYkFGhFXoE56oaohRYJiu22FZ+/jdGYjkxfkKX/Y5yrXqPVzPsj3x3tb3udTc+ rLNZJies5CLdvn3LTGt6Cup5NoMnRvl8i6lFKOhwhxWVDjYArGY5LKyyjiCddJEc/vkz DXPWz3qDz+ygoOdAtvD3SfwD26vRuYvrNYLYhlV646xeqw48SgJHwru00CYzPJFxPSZa dEqpN/OTmH90DMT2aKBTBKqJN6JPyZzmrxlwo2YGQGwLU9yttgbkrDdaBC7YBaXy52OC TCOw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:reply-to:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=XIvsfBoUlx8X8o2tPgZOm7bAnD0kMXnofYnq8hjc5O8=; b=cBIaOwiERMg8q4tBEMQItEJKk+7Xijf2o3fZefkYb0T0JUhA9vV9mvsdwkttZ0Z0iH 21zTTKedZYKEHWqBEdOpd7ET1mV6QOosnkSeC4tPx5QLz7ASIreqyP1H4G5yuHa34btu x13fAhevNamUbdKF1rhDfsBp6IZFdUNpOlKfKGme6g2iYVECzPdSpceyzf01zQSxeZXG GwLdVfDGl+ERgBBxWXqUkaaB1aFWwdn0I5NsABR5nyQZ2d9Ux/L/KtWLjrdHaxxJEtfo LDUamlad4er43BDH05/jJgAajiiqjMqkQUMIx+ugmC4iDQzwANe1G6lRCFbWN2rZiM1q 9ePQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector2 header.b=K57ipt7v; arc=pass (i=1 spf=pass spfdomain=microsoft.com dkim=pass dkdomain=microsoft.com dmarc=pass fromdomain=microsoft.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id tj5-20020a170907c24500b007acdb4016e0si4958569ejc.224.2022.10.28.14.01.14; Fri, 28 Oct 2022 14:01:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector2 header.b=K57ipt7v; arc=pass (i=1 spf=pass spfdomain=microsoft.com dkim=pass dkdomain=microsoft.com dmarc=pass fromdomain=microsoft.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230127AbiJ1U6L (ORCPT + 99 others); Fri, 28 Oct 2022 16:58:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229772AbiJ1U5n (ORCPT ); Fri, 28 Oct 2022 16:57:43 -0400 Received: from na01-obe.outbound.protection.outlook.com (mail-eastusazon11021025.outbound.protection.outlook.com [52.101.52.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E384522658C; Fri, 28 Oct 2022 13:57:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KnPJuftSLpFq39ySG1DYAxDLK/HBLVPY/OBI72c+UJ3SIIOuw0HcRvgnIWmLGN9av3+dmbWNCFo1ArLMBz3W9lVSxSsxsDgkps5501npMMP/evBB3buEPDsu9ebnjTi1CF14HO6qJf60tZkdLmK19PzZXuVfa6+q+oYANd3a0ZCmfcUA+KWHjvobz4rEeBD7znhg93ujqmYriyVFDgBV1l+ALZZXlxWOmneDxOhrvWSAfJekiQFZV/lHhmk+L/MKBZ+zLhkhKEK2xWEBM9BoDEt73ZaAsF/iuI2cAKRHuYWSgTlCHeIcGx/Xtznw9dtnoef/XiNqiXU2/6EFzX18Xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=XIvsfBoUlx8X8o2tPgZOm7bAnD0kMXnofYnq8hjc5O8=; b=AfSxUCK07EGvKUf76IztI5DvNUg+7NHxrrIuUFXUJJlS4MUmoVSlmnMdcXqcw/BIiAGb1IF8RNup/sF5J0h2eUng3yMi6VQPwuf9PW/9L3DHVUkvyGyr4OyhOP9h5U9WB5JUtE3e55Y65pCKDGhfIt8LCuyW8pdeod7Bt+sQi5ditI77ONLwITITKjRLTESmRxNfYUq5yjmiUEiqwHaKp6fhJxz9E3CtpuVP0En80xHmNwZo/co2r4qr7nUx44MwFknPx3yzWA8tEaZqi1QPt9gjuJcn1Ry0fq2gg7vFU4mDtiOr1ufZ7YjFfbgrYSxSdkOCQCuEPomNvrQndLo9yg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XIvsfBoUlx8X8o2tPgZOm7bAnD0kMXnofYnq8hjc5O8=; b=K57ipt7vTp5EXIUiuCp4NEBYk20MXVFHdNnXTpwazGuNeNL1zcMJeFL7aeMWNT0BIUYtr4v4MXtZJkyMsKaiS6eI9I125dd3c4JRsUmPCdYHs7wFfjVs0KaS4Uh7um8u6ppV51vhMlPSGqZpkHoWp/f+S5RDZllHLsAkF0PoKMg= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=microsoft.com; Received: from BL0PR2101MB1092.namprd21.prod.outlook.com (2603:10b6:207:30::23) by PH0PR21MB1912.namprd21.prod.outlook.com (2603:10b6:510:d::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.9; Fri, 28 Oct 2022 20:57:33 +0000 Received: from BL0PR2101MB1092.namprd21.prod.outlook.com ([fe80::a746:e3bf:9f88:152f]) by BL0PR2101MB1092.namprd21.prod.outlook.com ([fe80::a746:e3bf:9f88:152f%8]) with mapi id 15.20.5791.010; Fri, 28 Oct 2022 20:57:32 +0000 From: Dexuan Cui To: sgarzare@redhat.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, arseny.krasnov@kaspersky.com, netdev@vger.kernel.org Cc: virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, kys@microsoft.com, haiyangz@microsoft.com, stephen@networkplumber.org, wei.liu@kernel.org, linux-hyperv@vger.kernel.org, Dexuan Cui Subject: [PATCH 2/2] vsock: fix possible infinite sleep in vsock_connectible_wait_data() Date: Fri, 28 Oct 2022 13:56:46 -0700 Message-Id: <20221028205646.28084-3-decui@microsoft.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20221028205646.28084-1-decui@microsoft.com> References: <20221028205646.28084-1-decui@microsoft.com> Reply-To: decui@microsoft.com X-ClientProxiedBy: MW4P223CA0022.NAMP223.PROD.OUTLOOK.COM (2603:10b6:303:80::27) To BL0PR2101MB1092.namprd21.prod.outlook.com (2603:10b6:207:30::23) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL0PR2101MB1092:EE_|PH0PR21MB1912:EE_ X-MS-Office365-Filtering-Correlation-Id: 7f44e39b-cbcf-4d0c-1443-08dab927089e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: j3kkpxTvHY/6v82qAvRaPkv5+G8SguZqPQ9fuPnFhe8mu7l+SIDzxdMd7W5Fie1PUF4K5irDFqiiXpXET5NsydHwxblgtIRQoS2Qk3um2UfcjLPXqThh1OTCjBK+ANiDQ0+qVUtZipHYepUMfmBgQdfxxo9c5jzZopTpX+ofMSmn/45p+EAf5617cVSQM/DPaSjUGGqa5QdXYK+z0CGCfXy9H74dr3FznqOW5gIhzSQWN14jVb9uaovViUOPCLXztzDhsKIMPVjGDQT1OwZLj9H9RO96+uJ4GEt6CtKOHebZBrdxBFMgQ3cUNMgiETui+ZbRSgXpTm0367Dy0JYoP8kcpWrznnDepGTAbsXmOIfSyBgsVLVv0yFwXj/1FyeHul1EAFQKYXijQCfOrDK++rxGyYf7WyQORzYPCdqPHxZKimGTjWHj/SEp13T67AZIAfmAdlhtbggC7Q7T6Mnkx1mVaunlOwvLsaKeo+RVN8AKu7BOadRmhbKruSZM/DBSka4lIKVpLo++BlBKgnOqluJnzyFs0tBODpRstKBh+bcAde7YumQ3sg8iXGzXPU16hESGV7uXE2f3v0CnUOLkbKVLd/kn0rMnu/vKlzCPj4EEjJ7tk0BcZXvw+tYnasocgBJ3/O4iz5Ca/V98QtxngLdRXv59Jm976ofx3nQeP4EZ6TDnEUz0RpVhqWkUFwx1bVB7tLJqMM5vRwThpl4sPvi9iXsSlLslw03/az+1xwCxqACARruxs7iQUJQfoMAI X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BL0PR2101MB1092.namprd21.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(396003)(136003)(39860400002)(376002)(346002)(366004)(451199015)(6666004)(107886003)(52116002)(6506007)(82950400001)(8676002)(4326008)(7416002)(2906002)(3450700001)(66556008)(5660300002)(82960400001)(38100700002)(1076003)(41300700001)(86362001)(6512007)(66476007)(66946007)(316002)(36756003)(2616005)(186003)(83380400001)(6486002)(10290500003)(478600001)(8936002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: QccOEw7B8D5KEOfi6PYCZoFhupOzIjLAx8lu0W/wLYQAGRY0kw2Wc7jOwBIAUI66JJmNHNE7gCUg2Jb4dnQgoOSw7c0nhh8HaJzfZCkE7p3/RSFI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BYkz2nD+WWVhbEOVZyq6x8b2goRtykxnjheuj7vbxqbXU8dXiJtuMamjvmt5hm6bvYL+6lhYQezAf/Hzu83mkra0WQtVe4A+aen1DQ+We5k6gxjyQu4WO9+Hwvsfs+wVhWFm41XzsfHNXbf9CLJ53uwBt5Wtwo8gdhNoqUxSVGaTh9PI7tGWTtXYnm1jKKoEsAWXCCVoqTwSp6IQ6mwNFMZNL/4OBHWkcqM4XqssVZDgjUYwIzFv15B0WudeXlgbDt2JGHTMohUicLnL18b+HcZKnkkquIWmF1NIXshzFBOzq1ytWhDxPbqZwa1hNyMkjN3YwbDtSUQnCdO9qBaKwWd7TLbLgKZkjuck5bFl2ToXI0ZdM/ntKMY6eo1PSNqdmzZAlp5MmfactRVQFCeAi/Xl6PlqcDz3ARWVpp/ndJtaN9V/mjO48X/RhVsGi0zC6ydT4CSw+rh78veofePeha+JIR3nQ+yp X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7f44e39b-cbcf-4d0c-1443-08dab927089e X-MS-Exchange-CrossTenant-AuthSource: BL0PR2101MB1092.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2022 20:57:32.8298 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: KXIh7+vDvT/H76kuCOuyg6ff0witgokUW8+10Xx14pntpux3bhrLwLbv4M8duJaXyGXeCeYEuxw/aeVKjCU4Qw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR21MB1912 X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_NONE autolearn=no 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747966660378334866?= X-GMAIL-MSGID: =?utf-8?q?1747966660378334866?= Currently vsock_connectible_has_data() may miss a wakeup operation between vsock_connectible_has_data() == 0 and the prepare_to_wait(). Fix the race by adding the process to the wait qeuue before checking vsock_connectible_has_data(). Fixes: b3f7fd54881b ("af_vsock: separate wait data loop") Signed-off-by: Dexuan Cui --- net/vmw_vsock/af_vsock.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c index d258fd43092e..03a6b5bc6ba7 100644 --- a/net/vmw_vsock/af_vsock.c +++ b/net/vmw_vsock/af_vsock.c @@ -1905,8 +1905,11 @@ static int vsock_connectible_wait_data(struct sock *sk, err = 0; transport = vsk->transport; - while ((data = vsock_connectible_has_data(vsk)) == 0) { + while (1) { prepare_to_wait(sk_sleep(sk), wait, TASK_INTERRUPTIBLE); + data = vsock_connectible_has_data(vsk); + if (data != 0) + break; if (sk->sk_err != 0 || (sk->sk_shutdown & RCV_SHUTDOWN) || @@ -1937,6 +1940,8 @@ static int vsock_connectible_wait_data(struct sock *sk, err = -EAGAIN; break; } + + finish_wait(sk_sleep(sk), wait); } finish_wait(sk_sleep(sk), wait);