Article View: linux.kernel.netdev
Article #13473Re: [PATCH] net/sched: revalidate the sleeping-root lock in timers
From: Jakub Kicinski
Date: Mon, 09 Nov 2026 23:10
Date: Mon, 09 Nov 2026 23:10
28 lines
8909 bytes
8909 bytes
On Thu, 29 Oct 2026 21:23:12 -0700 Kyle Zeng wrote: > Autonomous qdisc timers select their lock through qdisc_sleeping. > dev_graft_qdisc() changes that pointer while holding the previous root's > lock, but a timer may have read the old pointer before the graft and only > acquire its lock afterwards. RCU keeps the old qdisc alive; it does not > make that lock protect the replacement hierarchy. > > For example, a backlogged MQ child retained by an outstanding filter > request can be detached and regrafted at the same parent. An SFQ timer > that selected the interim root can then rehash its queues under that > obsolete lock while tbf_graft() resets the SFQ under the current root's > lock. This corrupts skb lists and SFQ slot state. > > Add an RCU-side helper which acquires the sleeping-root lock, checks > that the root is still current, and retries if it changed. Once the > check succeeds, dev_graft_qdisc() cannot replace the root until the > callback releases its lock. Use it in the SFQ, RED, PIE, FQ-PIE and > DualPI2 timers. > > Route default-qdisc attachment and scheduler shutdown through > dev_graft_qdisc() as well, so live sleeping-root publications follow > the same locking protocol. Clashiko suggests the fix is incomplete: https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261030042312.74363-1-kylebot@openai.com -- pw-bot: cr
Technical Details
Message-ID:
<20261109151040.050550ba@kicinski-fedora-PF5CM1Y0>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!2.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-359657-linux-kernel-netdev=dewy.ruReferences:
<20261030042312.74363-1-kylebot@openai.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!2.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-359657-linux-kernel-netdev=dewy.ru From: kuba@kernel.org (Jakub Kicinski) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH] net/sched: revalidate the sleeping-root lock in timers Date: Mon, 9 Nov 2026 15:10:48 -0800 Organization: Usenet Network Message-ID: <20261109151040.050550ba@kicinski-fedora-PF5CM1Y0> References: <20261030042312.74363-1-kylebot@openai.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Injection-Info: usenet.network; logging-data="471288"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:YPgEmPUtT54ifRqVyNxPmbtXUoo= sha256:rIplJfHQNGEJcQ9EXOi4a8QDh0oMVUAk0my++1/I1bo= sha1:mSdCthp57sLgvDkBqBV0mRYXkKk= sha256:aN1zriZXDGApD2lAUdUUNyCDmznwozDzswlyGcccpAc= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 12538113969; Tue, 10 Nov 2026 02:12:56 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.401 X-Spam-Status: No, score=-3.401 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iUZ7vHdZPxmy; Tue, 10 Nov 2026 02:12:52 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-359657-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 17D9C113960; Tue, 10 Nov 2026 02:12:43 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id B1B1061FC7; Mon, 9 Nov 2026 23:10:58 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1794265857; b=Q1sJKedruzS6MU65rGmviZTfpxiG4Bu4HEOer+Rf2yQB9+jt6CczTJpPSFq52tUII187 aqfUvazpgwbbUgKsuHA1lLGfA7EhsEXaUMN9yY+Y4AREwpCgVMa2+UV3cqU+Ml9Xdo1Vb MClfvf57yCOhIv9SSpteQhLtUl1k4NoDhzXyJdJZq73ar39QfEq980CRuwCZjzvPh6p7I BmMlMyoiM6+UOigZUINzVMwcCUJH/ai32U0mUs6DqkrplMSHf9ztmZXk6qtbT/R3mvSVs FPkJVvSh/+V7uk11EegSlVtLDoN0YAa650tIiumiUw7GbZSpX54WoZONYTJ3BJt4shQ== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794265857; h=X-Original-To:Received:Received:DKIM-Signature:Date:From:To:Cc: Subject:Message-ID:In-Reply-To:References:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=HaJlroY9pRtUeNSxJxKIPMUGSA6RCeyCrCa+Q3bzSpM=; b=SsbfH2mcOTfdQDmG4yT3F1egD6HIqciIcjEXjvvDB0XcroiYoXfTVbMDxlYmT+6tGMdm VeVGDczCPTQwzXacxRotWBdP8oFvXnpD3S7qVE8yjkVrEplIu2pjfwRVKWZSHNMok5k1o GZkDWtKtmiJQVmcBZF2dr7wGXCXVFWgilwDgFjS3z2QYVymzTzTfDTbFOrhWjlD2T+6kc JvetMc/inlbw27k6MdAh4StP+x0JNn67KrPoLFM5UUTzT5SCGiJRzhrL9RNOG67rIHEl9 8BwTX2Pcn40BnXVxJ40MgoK3isKBcAU4JHpcP6deqjG8jWWKLD4BG5b1orEhIHNpzHg== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=UHhVOo0e; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DA527606A335; Mon, 9 Nov 2026 23:10:57 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=UHhVOo0e X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794265852; b=ZdOxfk/Eub9q88q/4VCrU4XyRLG2sOkOZf9mPcCKlDLqrj667OdvbBPQLi0zrp4D6yMn UENBgiZpD1UE20cTsYy884kso22yBuR7ug/M8QS+rbW88CmyVfLhVTT1vugh/5ImmAWwR S3Z197h3a3SGQ+JSnSV0SB0Iu3jdKOq9Bw4Znb+82aWheBwfBzwFzVt3CB08h9nUyeyR/ zhC644+2h0bsBaNWyFUWnxl8l6v9ZBnvT6uqw+znXMJF2pjOwO0V7Qyj6ZhMYk2FBB5rq JL4prsUia3nX6qOhixAqyiXp8dPJikBZ+WkwjMqGXyDO1xhc/Zdvx1pQnEdq10snQ3g== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794265852; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: In-Reply-To:References:MIME-Version:Content-Type: Content-Transfer-Encoding; bh=HaJlroY9pRtUeNSxJxKIPMUGSA6RCeyCrCa+Q3bzSpM=; b=HQUJef1STnX81YYg+OKbxvtOzy1cpw1i2zMjTnMhI/d4N0Jka2tE6srn1IAYc4Ao9Pzt Yo055QOMi8AYVMkTb57Q1ltBzD0LeWQGJkjw3USVtHhJqQqvb7h+9GZF/s4TpE0LLlw0Z d6jaPgHtwz1AxYP3oElAjmeqzZsRHY/4N4KiBSY+sS+VgUQn4eQMWg8XnLfJsqaLGAvib 9f0QsewxFS6TTjkdvkSmPZVovph+ivKn4Q4XHkbvKvz85KCdcfGYkFUaS6F+PO+sgEx7u plWUJG1P81EZGxVLtKUH9unsOom9CZoDj0HkHn3Ovkrp8ReoK7MKxqQ6V82Qy7DIBBQ== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=UHhVOo0e; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B4988606A321; Mon, 9 Nov 2026 23:10:51 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4F9A31F0089F; Mon, 9 Nov 2026 23:10:50 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1794265851; bh=HaJlroY9pRtUeNSxJxKIPMUGSA6RCeyCrCa+Q3bzSpM=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=UHhVOo0ePWYpZuMrpdb6wL5i3t/fpsYRdT6OtOCqusadMQrFgm7Ypi6GqwhILyqrB gDN1S3VEe7ZhiU78LMeVm+cpO8MUj1LK11fbMmlTfiYp2Y4iihzlXVpfUylVlXHuU9 ULS90T8eJV+UcW5Er9Bnx5TpVk8dhCKkKPv2h5LMPSbeCG6Eq0W67i2/vqKD8mvkSp eYIA1KwRqmrp2ZcZB8Ck+ultKy2iuU+kEIpPAsRypBDk9+s7MoKlXE+0faApuZSM+3 FC0XovwDJZZkEHIg7EbXnslPIkFiU3ZMEeMqCbKAkUtJWfFT3y7b1hZmGuKTNo41Ab JmP6IzKM+bZRQ== X-Cc: netdev@vger.kernel.org, Jamal Hadi Salim <jhs@mojatatu.com>, Jiri Pirko <jiri@resnulli.us>, linux-kernel@vger.kernel.org, outbounddisclosures@openai.com X-In-Reply-To: <20261030042312.74363-1-kylebot@openai.com> X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list