From nobody Sat Feb 7 15:09:39 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.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 30902326921 for ; Sun, 25 Jan 2026 16:07:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769357257; cv=none; b=qElVkML9/QmUoB8jAo6K++0YXL9n+33QR2ovj3JWdW+t96S73Rzj1+O5NxPF6+PycXFY+OWtqAMxPQ27ccXfWlTBndyU14lKjujYW5GQxXCzPW6MtxgAYiOhl2YLdtftkKM1p/WA056TK+4NmV7gOisdkVi44oT/WDlQGrW/aqM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769357257; c=relaxed/simple; bh=ygLKWd6lxdZdqlsr5rDJFC+BbK0FTEd19vN6oRrtlsg=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; b=ZGVV0z4uHFLVNLpHFT56RDlMWm7nC5H9jP3+S7ylW7GL96LAirIkE2mq0kFwW8P9iFwqIwbWWzRhTPwKu6QgDtZglXuL7G7DI1lYa4vpYx7DEvSVhrBZ4gA4BO9LzSRXnM/8zbN23H40GFMbFC4tL2BDwfWRcRuUxKauHDYEw9o= 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=L4KnWdRu; arc=none smtp.client-ip=170.10.133.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="L4KnWdRu" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1769357255; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to; bh=UzFafadD/xFA5DaIbLPJfWcnaK2KSCnXdhRnlT6y1nw=; b=L4KnWdRuO84cHRYVGidZvhns9F1gi+n+VHp4/Fgb80j2F3xW6g84B0nG04QE2kLCYi3iks ILcYmh4E7JJCqMknI4YiSOYiZ2oCPp8BuVPE/j198OVXUv9id/MXGESvzimMs7YhGESyv2 IlnEbr3i58lERx1M+b46qfXQeWy4aEM= 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-544-3eIJo3prPQijK62EceRZWA-1; Sun, 25 Jan 2026 11:07:30 -0500 X-MC-Unique: 3eIJo3prPQijK62EceRZWA-1 X-Mimecast-MFC-AGG-ID: 3eIJo3prPQijK62EceRZWA_1769357247 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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 CFB261800342; Sun, 25 Jan 2026 16:07:27 +0000 (UTC) Received: from fedora (unknown [10.45.224.8]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with SMTP id 0EC9930001A7; Sun, 25 Jan 2026 16:07:21 +0000 (UTC) Received: by fedora (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Sun, 25 Jan 2026 17:07:27 +0100 (CET) Date: Sun, 25 Jan 2026 17:07:20 +0100 From: Oleg Nesterov To: Andrew Morton Cc: Alice Ryhl , Boris Brezillon , Christian =?iso-8859-1?Q?K=F6nig?= , Felix Kuehling , Leon Romanovsky , Steven Price , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-rdma@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH v2 2/7] android/binder: use same_thread_group(proc->tsk, current) in binder_mmap() Message-ID: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" With or without this change the checked condition can be falsely true if proc->tsk execs, but this is fine: binder_alloc_mmap_handler() checks vma->vm_mm =3D=3D alloc->mm. Signed-off-by: Oleg Nesterov Reviewed-by: Alice Ryhl --- drivers/android/binder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/android/binder.c b/drivers/android/binder.c index dea701daabb0..b3b73303f84d 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c @@ -6015,7 +6015,7 @@ static int binder_mmap(struct file *filp, struct vm_a= rea_struct *vma) { struct binder_proc *proc =3D filp->private_data; =20 - if (proc->tsk !=3D current->group_leader) + if (!same_thread_group(proc->tsk, current)) return -EINVAL; =20 binder_debug(BINDER_DEBUG_OPEN_CLOSE, --=20 2.52.0