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 00AC8426D13 for ; Tue, 20 Jan 2026 12:39:15 +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=1768912757; cv=none; b=kDugCn5ybQB5g/sTjDU4FxAgUkg0nQp7tXViN5i8+o1vX3RpUIPMRKPOpKrsn231KkStcuofCAJH2xXKFu+Qs68oZhe57n9fwGz6FfBrHT309kniNg2Y7KOO3Gc666Vhuh8WyA2uEGFgFTZ3Cc3YeHsXvUqrlpTDuO55fd8G3z4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768912757; c=relaxed/simple; bh=4hQ5wthGbRwK+tJ8j7a8ZpnaN272v9XF9TyqQHVeT7M=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=niDQp5DFYOveo+zu+U1vDhqy07mMc7cvfugedqMw/hMkk1coaWccyiehasfvrjrQOt34V1nXevEt2ksatlmgo0bWQ3rXviSPRQYIc99BNhsTAuBza5OpDqBZlCoI3XS7U/3hlJrJUOey2vCyRpAJmuo5+qE8h97UJPoJ9SCCC1Q= 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=SINlgYNR; 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="SINlgYNR" Received: by mail-wm1-f73.google.com with SMTP id 5b1f17b1804b1-4801e2e3532so21910265e9.2 for ; Tue, 20 Jan 2026 04:39:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1768912754; x=1769517554; 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=aC20Vi3ua6RNxinQI5h1askXn9iFU0ocrDNDebQDeNI=; b=SINlgYNR2tMUaMhpKlTrBu24v2h7sDtC19jXJFpl3psVbL8Kzxm6+vO/x7W0/z4HxD eaB7ohKK8yTpqOjVFmNqyfzWZ9BL9JtcHuHJHx2R2yOilpBTpQL2XApTO4d31ptnVMN3 E3lWP/DJZEVWV34g5BPZWHPHPOWWzEtEU0n+kj5ED+FAIPyhEAUMFVK0o4td/w2Iszne LJwa/XtQwmsiXyb6bp9fZzSUQiKaMq7RM74YsdVaP3GXFYf8Jau60ucY3LGE49C7iGjI wyKeZH6S36RzTf8NVLSAKaN8MDmupPMra+Tt51T42NZvAvynocg6Dz+VY3Jt5RGvjOIT zv+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768912754; x=1769517554; 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=aC20Vi3ua6RNxinQI5h1askXn9iFU0ocrDNDebQDeNI=; b=hVdCUW29oR7ZUn2EEIPfQYDTzSy2TJonqZJf9rlKGoGEUQIBVPy0iGvfM+IYgw4Mb8 3R90S1aE2ovq8Y7IpJAjy3rkLgpzt6n4Uam9YeOL8YYEPAFCEJKJ2O1Hc5H3/SpzGF+q pZTmDwO2B+8wwgRY+n2UDhFgVMAB1pw0Il2zeqb+l3jSb27eolTvMeDba1cIYSS/5ypP jmMv6v3LPhO4+GzoZ5jgusqobjO301Ai1YMKagNIbrOmGEigRu1JwcFSu72f+8bmGlyT ffQaw10mcj/QzWNqpKYJCps8q17/h0xA949gHPTAcLo//ytgjDxgB0qSk2FFjB1EDqep tAEA== X-Gm-Message-State: AOJu0YxmNBw7obJS80oQwY5NkK0D+CJzDy1ouDEGpQz2z7UHYCxorul5 PuQdrOZxfF1b+jLHjVzKqqQPB4qGvzpSCzqSmGdlC96JwTwAAJQGPzz1Sd55BAmE85zZuhWWTcU 5LgoZTce8EF439Rj9kw== X-Received: from wmig10.prod.google.com ([2002:a05:600c:140a:b0:47a:9f70:c329]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:811a:b0:480:1dc6:2686 with SMTP id 5b1f17b1804b1-4801eac0cfcmr156081605e9.13.1768912754423; Tue, 20 Jan 2026 04:39:14 -0800 (PST) Date: Tue, 20 Jan 2026 12:39:13 +0000 In-Reply-To: <20260120115207.55318-2-boqun.feng@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260120115207.55318-1-boqun.feng@gmail.com> <20260120115207.55318-2-boqun.feng@gmail.com> Message-ID: Subject: Re: [PATCH 1/2] rust: sync: atomic: Remove bound `T: Sync` for `Atomci::from_ptr()` From: Alice Ryhl To: Boqun Feng Cc: linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org, linux-fsdevel@vger.kernel.org, kasan-dev@googlegroups.com, Will Deacon , Peter Zijlstra , Mark Rutland , Gary Guo , Miguel Ojeda , "=?utf-8?B?QmrDtnJu?= Roy Baron" , Benno Lossin , Andreas Hindborg , Trevor Gross , Danilo Krummrich , Elle Rhumsaa , "Paul E. McKenney" , Marco Elver , FUJITA Tomonori Content-Type: text/plain; charset="utf-8" On Tue, Jan 20, 2026 at 07:52:06PM +0800, Boqun Feng wrote: > Originally, `Atomic::from_ptr()` requires `T` being a `Sync` because I > thought having the ability to do `from_ptr()` meant multiplle > `&Atomic`s shared by different threads, which was identical (or > similar) to multiple `&T`s shared by different threads. Hence `T` was > required to be `Sync`. However this is not true, since `&Atomic` is > not the same at `&T`. Moreover, having this bound makes `Atomic::<*mut > T>::from_ptr()` impossible, which is definitely not intended. Therefore > remove the `T: Sync` bound. > > Fixes: 29c32c405e53 ("rust: sync: atomic: Add generic atomics") > Signed-off-by: Boqun Feng there is a typo in patch title