Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp702609pxb; Tue, 5 Apr 2022 19:27:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxBWdTYiRhKfx6lKH6ydHWcIs4yahfzYROYk6rnAcodOAs/SH1gJ007dbzaenbq/Gb23b2I X-Received: by 2002:a17:906:32d0:b0:6ce:e1cf:3f2e with SMTP id k16-20020a17090632d000b006cee1cf3f2emr6016016ejk.214.1649212028897; Tue, 05 Apr 2022 19:27:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649212028; cv=none; d=google.com; s=arc-20160816; b=e428jJ1os9D6Pd3RnvNpxrrjSPs39sm3UVT9udLNups1cyp3xHiEOgGJtqi2n9O2NK 2XVW4M55TafasEauOJ1WCrQ2UaqCsLqur6Y3BjGk2URiLdinGnlybRCKLSr8GbcfyRPp 2I7K5oXvZXcdpkN2MRwTMa9ZHJ3WspPiAiklJ1vmGh9rJGlbOL/YHq24rH6XILKQZHec Y3MtlWYNofHd1tjYAwMZT/H7uJVL4jiraJ0U8lk+wzQPeOAmsoARynOp5PGcJq9IM9Q/ LwK2MXtwDwpu92FgCqdlXPxUIHx7DtTKJuVM0GKNiS8pzYeN75iTysaUO3ghYv1cK0Yo 6tIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=wk00qm6+gXgUZS5feAYVs7vUg9CrX1JBb7Ci72b7SSE=; b=ooB/PSXNphste8YWI1amV2/4ouaj4sEBSb/UDq1CL4nin0i4bAkbRKv11YtK7QM24O TJnDsI1TnnA2emOGj90AIrq5B+jqjx8louV4+xtyKpnLuUmuIFQcDf6WOmMMlvU290Oe MDxb+5EwVQnt+NwK9A3IyYJTRPOX2pdYXjEIp4JOGb9Ks8UWPyVXu/ljbLBK0MUM8w4z yzu7PuyRHzfRREgDyelKjg0/9Jjp0jdiswwidZ1pgAlWAUFqACQJhcVBqj0ye1euy+9A tiLn3McjNlqP3hQm2m+XyUirCmLpbMbM//7CXgo0E0JebDmvR6x2VMVV0Ljr4voRPd4x cKsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=trfCNxeb; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id rs13-20020a170907036d00b006df76385ee8si6912029ejb.904.2022.04.05.19.26.44; Tue, 05 Apr 2022 19:27:08 -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=@linuxfoundation.org header.s=korg header.b=trfCNxeb; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343773AbiDEJMs (ORCPT + 99 others); Tue, 5 Apr 2022 05:12:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239619AbiDEIUQ (ORCPT ); Tue, 5 Apr 2022 04:20:16 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 399E61C9; Tue, 5 Apr 2022 01:17:42 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id E4BE0B81A37; Tue, 5 Apr 2022 08:17:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 50820C385A0; Tue, 5 Apr 2022 08:17:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649146659; bh=TAIHegqTVYUQT1dYTJ1rIsOiROabndahkgbT+ieyP/U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=trfCNxebxu4h5BeVSn430F9N2T1/LiQoanTSQkBcUrOgiBs1q7wjPGzMsQE1Y7OOW X3O8/veyMs3FkeCXDxSLVfOe/3JGi5P2XFvme0qXnR2/+ki2i2vUufDgVgjhcaDSpx wKR2WHLfToySx9tPFGywaPMkXcfbLCNDGc/JRc2M= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stefano Garzarella , "Michael S. Tsirkin" , Stefan Hajnoczi , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.17 0803/1126] vsock/virtio: enable VQs early on probe Date: Tue, 5 Apr 2022 09:25:50 +0200 Message-Id: <20220405070431.139174374@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070407.513532867@linuxfoundation.org> References: <20220405070407.513532867@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 From: Stefano Garzarella [ Upstream commit 88704454ef8b00ea91537ae0d47d9348077e0e72 ] virtio spec requires drivers to set DRIVER_OK before using VQs. This is set automatically after probe returns, but virtio-vsock driver uses VQs in the probe function to fill rx and event VQs with new buffers. Let's fix this, calling virtio_device_ready() before using VQs in the probe function. Fixes: 0ea9e1d3a9e3 ("VSOCK: Introduce virtio_transport.ko") Signed-off-by: Stefano Garzarella Acked-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- net/vmw_vsock/virtio_transport.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/vmw_vsock/virtio_transport.c b/net/vmw_vsock/virtio_transport.c index 3954d3be9083..ba1c8cc0c467 100644 --- a/net/vmw_vsock/virtio_transport.c +++ b/net/vmw_vsock/virtio_transport.c @@ -627,6 +627,8 @@ static int virtio_vsock_probe(struct virtio_device *vdev) vdev->priv = vsock; + virtio_device_ready(vdev); + mutex_lock(&vsock->tx_lock); vsock->tx_run = true; mutex_unlock(&vsock->tx_lock); -- 2.34.1