From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f73.google.com (mail-wm1-f73.google.com [209.85.128.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 241453126B2 for ; Fri, 27 Feb 2026 19:01:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772218882; cv=none; b=mYSnRcV/qFS+l3yHZmLKB2u5xkll8UyEY3KaEMSzFymMm7grI5Ovcy4rCb/rfZrgKR3SiZD1EVWhOJzeDM2Bf77jXFKMKn/ygs1NQXH9tRrAES0h+0mo6pEU9n5uHcPoT+l4jhRo+2MW3QusUaTN9WSnAxi/uCrNtoqqtvEckg0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772218882; c=relaxed/simple; bh=FJ5/Y7lkvMiZD3996h5Kzz1gx0aNl94jykd5wUZUaSI=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=vFa1B4hx/wNVndgNpctLc/cwrlSN93hoNvgGuIRSw54E6vOuLB5wbOzoayltekxNjab1hrHbUQnsx+75ik3XqSnkYHGBQ9+o+dtPGJt+i4lnXNVCwJw/MttKNtcqUOf6wmd2QB2Ya0dtMV70MkxKLzNcQdqQNHBEOJcREX6YzyU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=FZCIOjRq; arc=none smtp.client-ip=209.85.128.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="FZCIOjRq" Received: by mail-wm1-f73.google.com with SMTP id 5b1f17b1804b1-48069a43217so20131785e9.1 for ; Fri, 27 Feb 2026 11:01:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1772218879; x=1772823679; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=Z76+M/HerVegBYFMUlZFszGzoRv/Jzqi5XqbM2psUic=; b=FZCIOjRqXkQarF3Xp7l2RSjcateE9lJNmv5MZ21MTpHih9YPZisuzCdZE0NGXTw+ru ou/a6ZlhP1zQUuPlMok0SrjdkWtU//IHBjNPfVUwfJhKVHuw/0+LXecEQjSYtQmWZifQ jNF2swb2cOiW6nAzi6ET+e9kviJpX2/JPy48jNUDl+meNxHQvNEfN2PvbEoJRTolX3/i H/9fXJAuNSTCICBBqdd1W2lCLeIEg/w/p5/qnSghqdrrag8yfltIaN5pMBBqq8VTdmat 8/zyw/NSnUoy7TT9Vsz/qcWvpdYk2s4B6yvp1r9dHONL5hN7LewPuBNvP+IfbHYHzlYy PVHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772218879; x=1772823679; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Z76+M/HerVegBYFMUlZFszGzoRv/Jzqi5XqbM2psUic=; b=LJH/KQ+zYtfxVG+1dcCE5AJIKN/cYlvhpcCF3EP2NwLo5xU4KV38m0N4E8SKYxVXaK NDmSAA84H2BvcmW3QgykDcnxpx1aJYEh30O3bpVidWBeR2F+bH0r1xuL35LMEMhVhyFo SkUMTUtuV7XTFrGVX7Kq6HvdOxESSqZSLKkk5+ODEqIm0XbHbY2jJvrOkg+vPhWkVktM ssfyaM0AwG5rvmXTu4X1V5PzLp3Ux9xSX7JvgE0Po83C1p59Zoy4adQ0idHCNGuJhg9x 1O3Awpa7/kljuTJ074yowcsgWQ+DacjJ5T6kWDTe/wLPIe3xFxQ47xm9DNDtpld26zH9 VdAw== X-Forwarded-Encrypted: i=1; AJvYcCVkVa/IXE6tyFTG/mtzG9WlVwGzEjjugNHRHJV0DCDTjnnYa8OhX7GOTjjVO4XAiPsiFLovUksy9eC2+8I=@vger.kernel.org X-Gm-Message-State: AOJu0YyZRcnO95qv45JikvRPK33OWYaRvfwOt6SPu5lS9kFXiHsvz0R6 GCmGpZ61qTV4sM0cWmU2LABMAF1Hzj7vhGAtI5WmDr5OAja8JSha4LS5SrCFdyDG3gb+1XzG0vW 9QDYlXGVwrDPl6MyZMw== X-Received: from wrbeh6.prod.google.com ([2002:a05:6000:4106:b0:437:6c0a:770e]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:1d12:b0:483:9cdc:8ac1 with SMTP id 5b1f17b1804b1-483c9b9eb7amr56134105e9.11.1772218879316; Fri, 27 Feb 2026 11:01:19 -0800 (PST) Date: Fri, 27 Feb 2026 19:01:18 +0000 In-Reply-To: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260227-create-workqueue-v3-0-87de133f7849@google.com> <20260227-create-workqueue-v3-1-87de133f7849@google.com> Message-ID: Subject: Re: [PATCH v3 1/2] rust: workqueue: restrict delayed work to global wqs From: Alice Ryhl To: Tejun Heo Cc: Miguel Ojeda , Lai Jiangshan , Gary Guo , "=?utf-8?B?QmrDtnJu?= Roy Baron" , Andreas Hindborg , Trevor Gross , Danilo Krummrich , Daniel Almeida , John Hubbard , Philipp Stanner , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, Boqun Feng , Benno Lossin , Tamir Duberstein , stable@vger.kernel.org Content-Type: text/plain; charset="utf-8" On Fri, Feb 27, 2026 at 07:09:07AM -1000, Tejun Heo wrote: > On Fri, Feb 27, 2026 at 02:53:20PM +0000, Alice Ryhl wrote: > > When a workqueue is shut down, delayed work that is pending but not > > scheduled does not get properly cleaned up, so it's not safe to use > > `enqueue_delayed` on a workqueue that might be destroyed. To fix this, > > restricted `enqueue_delayed` to static queues. > > C being C, we've been just chalking this up as "user error", but please feel > free to add per-workqueue percpu ref for pending delayed work items if > that'd help. That shouldn't be noticeably expensive and should help > straighten this out for rust hopefully. I had been thinking I would pick up this patch again: https://lore.kernel.org/all/20250423-destroy-workqueue-flush-v1-1-3d74820780a5@google.com/ but it sounds like you're suggesting a different solution? Alice