From nobody Tue Apr 7 20:24:16 2026 Received: from mail-ed1-f73.google.com (mail-ed1-f73.google.com [209.85.208.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 6604E36EA83 for ; Fri, 27 Feb 2026 09:35:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.73 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772184909; cv=none; b=J5MVRY0idraNfG5ZnpNzTKRcTo/tkeyG4T7BuXERlW6kIYe8o6QCk+tNB7kWan4acaeGz585fP1AZ98vl+N65ZY3GB2ajl4lo08p/IMcrP1XugARMgny6+YYtQN/HmyFM8g5UFa4US7G5CpDV/1uQqfiPJ5TJTEk2tVQIJn0aTs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772184909; c=relaxed/simple; bh=FTKtxrDMWAPs9/YZKz4bMujAf/Ljs0I5QuoQbjKaNpE=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=NDxK54k6S2SogJUpxK68oSczO8kMuo4VF2v9FTqNYJx2XPQSHY2EdnknexlX1x6L7iG4DrupMGod1JEcDJmxPbp8ZLtBW9Jb57qda/xW1mQ+5ZaeGHkczzsQC+u1XkSvuu/Dc+5ug5WoXIyUGkv6/tGRzkdTHUBJZEpnRA+ue9A= 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=YYA3CRoV; arc=none smtp.client-ip=209.85.208.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="YYA3CRoV" Received: by mail-ed1-f73.google.com with SMTP id 4fb4d7f45d1cf-65f8b971362so2051284a12.0 for ; Fri, 27 Feb 2026 01:35:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1772184905; x=1772789705; 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=cWVvIEgQeJcNm1KdAZ4hLHy83wx+q9wzmD28Xs83Lzk=; b=YYA3CRoVOQRagA974lq3EU6UC/aqajvf/LI4pOQK5QDWLuaBI7mEah75LGC/TpobzM 37dVjygaPPWGwbCbrfCXCa5ZCEdvqOtVlaD+DKqktCNAA/W/QHdBHX4eQY/smTFggtcE YUguQRvOLoAhkVrkTZoxiCJ3gWblCAfz8DQuEKCfvS93pJZv7vy1FLPy8+yTqGb7eUuz ae32DyPEiDlmk1KqlvxKTm7jfhYNkwQjeBsD9WlfBThIbXX29cBI6zMeaVDRJfPUFJDW cDS+JE28Pu27ty42qt5xVdH1xii7M8yDhCoUrpJrdRS3wqLHgSBPGp2jYs/Nq79WnVDL Vcpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772184905; x=1772789705; 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=cWVvIEgQeJcNm1KdAZ4hLHy83wx+q9wzmD28Xs83Lzk=; b=FMD93wokQGkyY1hyW8bFT75N+JkwNvS54HLXbD3GOcBrpNRJ27Rw4qch6OuQthbLil SvRljpA5Aw6/9HZNAzKsTaDc9aAySzxrfYg/uG5So2Z+uIjxEc5tjrK5mRSwhfKcpD+v iV8NMjSXsTCJnmMnlTMytzUlGalibezbi1GFmjO9cycfGLlp6+Z8PIvvaAAn5/BqfJiE TH3YiPfIqv9VI0RnSiL8rNbYliZFlXQOzepJ34V6gThZFSbU/lcJimWdgp29a5VYMcb6 BFh96YQzvwe/WiM0vWsca43cqj1jvzPPYF0wQa2Mp6CGIk/Fq6MSoPKnZV9ZXovh3j3Y /dMg== X-Forwarded-Encrypted: i=1; AJvYcCXWRQtaD6MU+tuLORDTmDpLKDxL+2Mmy/KiuMYjYwm0W+Q3HfhgI2SCXuIHmN2wjniSAIlnx2u2Ep3k0fE=@vger.kernel.org X-Gm-Message-State: AOJu0YyF5bDy0tCjs/X51sXNwNfqHHcQ9Iba1AtcZ0GQRMRcq9IWH0zf +WrMwoK5vEiwN8ZqCXAa7tgx3/iHYnv8sdWyA5OzrFvoqHvTBpZvoP7iyhOqM3XcA/Ns9a26heA kmj4RIkohNvGudvIK4Q== X-Received: from edrz5.prod.google.com ([2002:aa7:c645:0:b0:65f:71ac:2c0c]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6402:4301:b0:65a:3de6:c55 with SMTP id 4fb4d7f45d1cf-65fddee7ae7mr1548476a12.28.1772184904552; Fri, 27 Feb 2026 01:35:04 -0800 (PST) Date: Fri, 27 Feb 2026 09:34:48 +0000 In-Reply-To: <20260227-close-fd-check-current-v2-0-b3347edbb310@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260227-close-fd-check-current-v2-0-b3347edbb310@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=1383; i=aliceryhl@google.com; h=from:subject:message-id; bh=FTKtxrDMWAPs9/YZKz4bMujAf/Ljs0I5QuoQbjKaNpE=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpoWVBRb0rpWbJIEXEPJbxQKqEgtLAFKYr1pw0I rRLUkafsBWJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaaFlQQAKCRAEWL7uWMY5 RoJSD/9mYEGnLpocEzx+xiXdmOSNY+N55K41lDn0hIvM48Dr7qX3KJ1YU2QHdmOanPMTvaRXwbB E3mDWKLuM9OkINDJX27L1TVOvZcMqd35R4E4SFkE8MiQwbu7e6tKayqz1p4pD9SbZEvY4gARJW4 6R+/k0J+KxJVoET7tkINSBMjaLPIpD/XXKkmFwyTSLorJ8DFr3heg7Ymttu9RvRwHsBShH8HGMs t8jNtvjqrSDtYySQ4W7voSrJy//dj7jNwN+uB70jZcaERMCyJit3bL8uGd5JmkFG3dZEM0zV9Hr 76Gthb1+ea08sD8qUewlbEctr8uzECCBco1EvuRjvbCQ0FnUAahhoWlwaZlfwIeiBWsPY1X0DT1 EO01P7mpWXYZ2Z3fYF4/PV+vbqIzgpWl/4Dfek7PpG1KYbVEDfj7NrX0Ggfr9TUc/MZib6IaYth N6fVfZPol4eHHhMVoccTR+E/Hq7EuT0u34mrB0f1RPgRN4rbfWg0fb2PGbazdIXaugW7TF9ym/M gPKVLCnT0+ryQMb0yl2WRtkNnNFUYzOgfid9U6tqifdqQySRDI/P+SslLbOa5g6pDwGOs7DOHu5 vIrdnbfvRMyemULwQiidrPZXP/GAeycgLmBjCyNaSR8LB+wux4uDFVqkuSHaeWednuLbUP0bayI ML/yGSTCTbmYmgg== X-Mailer: b4 0.14.3 Message-ID: <20260227-close-fd-check-current-v2-3-b3347edbb310@google.com> Subject: [PATCH v2 3/4] rust_binder: make use of == for Task From: Alice Ryhl To: Greg Kroah-Hartman , Carlos Llamas , Miguel Ojeda , Boqun Feng , Gary Guo , "=?utf-8?q?Bj=C3=B6rn_Roy_Baron?=" , Benno Lossin , Andreas Hindborg , Trevor Gross , Danilo Krummrich Cc: rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, Alice Ryhl Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Now that we have implemented the =3D=3D operator for Task, replace the two raw pointer comparisons in Binder with the =3D=3D operator. Signed-off-by: Alice Ryhl Reviewed-by: Gary Guo --- drivers/android/binder/process.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/android/binder/process.rs b/drivers/android/binder/pro= cess.rs index 41de5593197c..b78c1490e654 100644 --- a/drivers/android/binder/process.rs +++ b/drivers/android/binder/process.rs @@ -681,7 +681,7 @@ pub(crate) fn get_work_or_register<'a>( fn get_current_thread(self: ArcBorrow<'_, Self>) -> Result= > { let id =3D { let current =3D kernel::current!(); - if !core::ptr::eq(current.group_leader(), &*self.task) { + if self.task !=3D current.group_leader() { pr_err!("get_current_thread was called from the wrong proc= ess."); return Err(EINVAL); } @@ -1669,7 +1669,7 @@ pub(crate) fn mmap( vma: &mm::virt::VmaNew, ) -> Result { // We don't allow mmap to be used in a different process. - if !core::ptr::eq(kernel::current!().group_leader(), &*this.task) { + if this.task !=3D kernel::current!().group_leader() { return Err(EINVAL); } if vma.start() =3D=3D 0 { --=20 2.53.0.473.g4a7958ca14-goog