Message ID | 20210111130037.342406655@linuxfoundation.org |
---|---|
State | Superseded |
Headers | show
Return-Path: <stable-owner@kernel.org> 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=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT 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 9D7A2C433E9 for <stable@archiver.kernel.org>; Mon, 11 Jan 2021 13:54:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 62770222F9 for <stable@archiver.kernel.org>; Mon, 11 Jan 2021 13:54:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731023AbhAKNyb (ORCPT <rfc822;stable@archiver.kernel.org>); Mon, 11 Jan 2021 08:54:31 -0500 Received: from mail.kernel.org ([198.145.29.99]:55254 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728539AbhAKNHv (ORCPT <rfc822;stable@vger.kernel.org>); Mon, 11 Jan 2021 08:07:51 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 83AE12250F; Mon, 11 Jan 2021 13:07:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1610370431; bh=VyYZfqz7pyEM9+NZAw3doltv84BrA+2D3lOrkDVhIgo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QKwnv/gJqQcPQWULtoPmhnYgUsu3mK1ELcMNhZB+E8q04FCdPYfIq+hnmaSsqJs7s D1ksT/mnjywp9FuXAoPersn823P/C98frDGjSQgNKxPtLZ32fMz8+ECKciRUOKee09 3quU/ok38gXHg78Zlb3LDm5ZY/NczlJVNXsER7ts= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Jeff Dike <jdike@akamai.com>, Jason Wang <jasowang@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, Jakub Kicinski <kuba@kernel.org> Subject: [PATCH 4.19 19/77] virtio_net: Fix recursive call to cpus_read_lock() Date: Mon, 11 Jan 2021 14:01:28 +0100 Message-Id: <20210111130037.342406655@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210111130036.414620026@linuxfoundation.org> References: <20210111130036.414620026@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
--- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -2077,14 +2077,16 @@ static int virtnet_set_channels(struct n get_online_cpus(); err = _virtnet_set_queues(vi, queue_pairs); - if (!err) { - netif_set_real_num_tx_queues(dev, queue_pairs); - netif_set_real_num_rx_queues(dev, queue_pairs); - - virtnet_set_affinity(vi); + if (err) { + put_online_cpus(); + goto err; } + virtnet_set_affinity(vi); put_online_cpus(); + netif_set_real_num_tx_queues(dev, queue_pairs); + netif_set_real_num_rx_queues(dev, queue_pairs); + err: return err; }