Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3851831pxb; Tue, 17 Nov 2020 05:24:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJx96YnWUokeKnCIZlEm6p+8X84a3WPGPkJImRWD84hkHQUXMhVl/ageKEhhfQZ1uM5rfO6O X-Received: by 2002:a17:906:4753:: with SMTP id j19mr18085091ejs.65.1605619453835; Tue, 17 Nov 2020 05:24:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605619453; cv=none; d=google.com; s=arc-20160816; b=g2dBSBmckmqC+A4DsuA2bjnmCcnDukNYyQEngJjFWVhqFvjF/DOtTsy7EER5RWQhhc imLAGo7tDyb7Pz/vhCfAQEpy5uiAIkWu7TjrvXzPOOdIOwN5pP5crY4sRg931CNUJOIC jsy87tEo4I0ikwRWCZNpy2QKUL5JTQmopB49w7WMMV+31Q/Y8POB3t3nPaFB2lGNjzup qWZ1yvcA+wqVaTF5piikAJ901g5u52pn5kad5auHhTEfwJuEAtuwM924pwEgnsYm+ZUr /ZrqcddaOdmkJCRSn3QJqRTPD5BVRFjgqWPFyOAyIzs+kOgzgVR3t26B/LLyp/nEb43d +c3Q== 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=hK0kNbhcKpdi3wx0FWvef8szv5nUNGih21hoPe4bEE4=; b=Wv+yR3R2IIEKiD5UXFz5dfsTPO1rmgxbisPLSaLvzfEc+u4Q1NHKWRPPZlb1ogp7sM jE3vNurR0uwIjY4HSXapx8S51A+im7OEJaTL7PTUD1M9CmvUUf7ZlcEC/+Gay1iJ1D6H z7lMvP4gLP2IRdtPnB2mYmaytOG4TMSrSMda928Nc8GEv3/Ro5taCDXSp91KfpNhpWOn +3fipo0NlPtmcQdmWYHtL8lfoMM7a32AmkvQtgwwN2stx9AsiLuLdcFvhaUqwzdL3fF7 jZ+uxo/1sbIDMxSloHX1DLmaTSkwaI21ioBWclZPetvRDRRGQIZGsGh62UQ9mKZw825W r7Eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=AA7CMD4w; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ca2si13897474edb.502.2020.11.17.05.23.51; Tue, 17 Nov 2020 05:24:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=AA7CMD4w; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731130AbgKQNWM (ORCPT + 99 others); Tue, 17 Nov 2020 08:22:12 -0500 Received: from mail.kernel.org ([198.145.29.99]:56120 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730338AbgKQNV5 (ORCPT ); Tue, 17 Nov 2020 08:21:57 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EA3882463D; Tue, 17 Nov 2020 13:21:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605619317; bh=MppfnIu6oV37wXieOEWrtlR/WYQgAZRPL/Kija+SLb8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AA7CMD4wKg/hRGyZ/za+zYsc0aDcSbZGxLsGB5yIqXSpNZlVpLARnBbpAPJXy78g6 PEtfa/4w7xQ2H7f4NaGX0+iqBxzQqxU9LY41D6RriKvl7yy0cGHGccd7Ka2HOSXDGx sSVdK9S9smWJzZq7nYiDIHuf4v3a1iIiCV5/4G48= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yunsheng Lin , Jakub Kicinski , Brian Norris Subject: [PATCH 4.19 100/101] net: sch_generic: fix the missing new qdisc assignment bug Date: Tue, 17 Nov 2020 14:06:07 +0100 Message-Id: <20201117122118.001756699@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201117122113.128215851@linuxfoundation.org> References: <20201117122113.128215851@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: X-Mailing-List: linux-kernel@vger.kernel.org When commit 2fb541c862c9 ("net: sch_generic: aviod concurrent reset and enqueue op for lockless qdisc") is backported to stable kernel, one assignment is missing, which causes two problems reported by Joakim and Vishwanath, see [1] and [2]. So add the assignment back to fix it. 1. https://www.spinics.net/lists/netdev/msg693916.html 2. https://www.spinics.net/lists/netdev/msg695131.html Fixes: 749cc0b0c7f3 ("net: sch_generic: aviod concurrent reset and enqueue op for lockless qdisc") Signed-off-by: Yunsheng Lin Acked-by: Jakub Kicinski Tested-by: Brian Norris Signed-off-by: Greg Kroah-Hartman --- net/sched/sch_generic.c | 3 +++ 1 file changed, 3 insertions(+) --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c @@ -1116,10 +1116,13 @@ static void dev_deactivate_queue(struct void *_qdisc_default) { struct Qdisc *qdisc = rtnl_dereference(dev_queue->qdisc); + struct Qdisc *qdisc_default = _qdisc_default; if (qdisc) { if (!(qdisc->flags & TCQ_F_BUILTIN)) set_bit(__QDISC_STATE_DEACTIVATED, &qdisc->state); + + rcu_assign_pointer(dev_queue->qdisc, qdisc_default); } }