From nobody Mon Oct 6 20:57:08 2025 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1CB172116E9 for ; Thu, 17 Jul 2025 18:43:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752777838; cv=none; b=d6YB0KEh5KUbceNqnkWHuIvV/jM5Shgfqd4e8APPD4jcD5R5pKgNsqUrS7SoDSvvz+c59gw5FbazTG9Ut+ji5LYPfiVh2M1g+N6xZ8Pvx86POFp1vyyDV4rVF3MHrFmI/e2agK3svlUzW2sF+NgQ/V2wdd21wUUxOLRtBkp52eU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752777838; c=relaxed/simple; bh=Z/KsvQ6Y/wJKZS0BbwqV/seBZ03+nXz5MF2MZWzZ5v8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Ifz/t3CvDTqgzxOwtjIOT52WDuVyhCu3Nmvq+yfQOiDSwt47Vu7bonEhkLJvmclL7HAwEDJMYb92gFG09yytzRW6a79Fy3GS/ZblUnIyhOkr9jiMj6eaGO6feqZ70lYsgVVnFGjhf1Tw6oJNSDIEXrZ/lYMDj9cCayqLCWXc1hM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=Q58M8016; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Q58M8016" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1752777836; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6jakQ+WDo02nJsU8eZCe9vTA6HfZAByvZlMl+Y4AFmA=; b=Q58M8016FGHMfYuhD/oRpoNf+lglEi2Ngjoavr0FHPnBIktsl/+CLCjc5bzIQP+ZFjMWjw 4t4Bm6NHk95bHAo++u6Sc9RLe/xNMimNooIrb+2H45bEL/PKVBVFxcODuxVo1SGd5rclMB shsJX708Bm6nKBabcLA3OZgjl9+g0ZE= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-645-rjP8F9YsMoCY8gWxuuR4mg-1; Thu, 17 Jul 2025 14:43:52 -0400 X-MC-Unique: rjP8F9YsMoCY8gWxuuR4mg-1 X-Mimecast-MFC-AGG-ID: rjP8F9YsMoCY8gWxuuR4mg_1752777830 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 149B71800D82; Thu, 17 Jul 2025 18:43:50 +0000 (UTC) Received: from chopper.redhat.com (unknown [10.22.66.69]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C8A431801712; Thu, 17 Jul 2025 18:43:46 +0000 (UTC) From: Lyude Paul To: rust-for-linux@vger.kernel.org, Thomas Gleixner , Boqun Feng , linux-kernel@vger.kernel.org, Daniel Almeida Cc: Miguel Ojeda , Alex Gaynor , Gary Guo , =?UTF-8?q?Bj=C3=B6rn=20Roy=20Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Danilo Krummrich , Mitchell Levy , Viresh Kumar , Wedson Almeida Filho Subject: [PATCH v11 11/14] rust: sync: Expose lock::Backend Date: Thu, 17 Jul 2025 14:38:03 -0400 Message-ID: <20250717184055.2071216-12-lyude@redhat.com> In-Reply-To: <20250717184055.2071216-1-lyude@redhat.com> References: <20250717184055.2071216-1-lyude@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 Content-Type: text/plain; charset="utf-8" Due to the addition of sync::lock::Backend::Context, lock guards can be returned with a different Backend than their respective lock. Since we'll be adding a trait bound for Backend to GlobalGuard in order to support this, users will need to be able to directly refer to Backend so that they can use it in trait bounds. So, let's make this easier for users and expose Backend in sync. Signed-off-by: Lyude Paul --- rust/kernel/sync.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/rust/kernel/sync.rs b/rust/kernel/sync.rs index f1e448e096ea9..ebf004193bca5 100644 --- a/rust/kernel/sync.rs +++ b/rust/kernel/sync.rs @@ -25,6 +25,7 @@ pub use lock::spinlock::{ new_spinlock, new_spinlock_irq, SpinLock, SpinLockGuard, SpinLockIrq, = SpinLockIrqGuard, }; +pub use lock::Backend; pub use locked_by::LockedBy; =20 /// Represents a lockdep class. It's a wrapper around C's `lock_class_key`. --=20 2.50.0