From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 51B9DC6379F for ; Tue, 27 Oct 2020 15:00:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 13B8A20714 for ; Tue, 27 Oct 2020 15:00:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603810842; bh=5K4mB24GEmt7llTBmAUxj2Pvwn1GRGpPH2zA/89wIcI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=00BPmnvyzSwjmc6JsPqL9nszCg+/geA04gLHythlddk+FGLqxPtrr0dMhUz67f8pI 6QP6Of6PmoA2Ylv/k9MHj33Z5c8x85XYIt08H/QbW/YpO6TUpXatj+2VGj48MWoolZ abQg9D+U/5XSGIf64TTxWsm2CeNws+wQa628ShvU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1788569AbgJ0PA2 (ORCPT ); Tue, 27 Oct 2020 11:00:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:57152 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1782043AbgJ0O43 (ORCPT ); Tue, 27 Oct 2020 10:56:29 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7680F2071A; Tue, 27 Oct 2020 14:56:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603810589; bh=5K4mB24GEmt7llTBmAUxj2Pvwn1GRGpPH2zA/89wIcI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l5j+Pn1D7AY1HHjtbWNIrUZcc4iQMoHdjEEfiP2QNhPSbaqPbt6FG/zMeeO5/pg7M lTyLBXL3B/frJzj84Dqhv6mTcJUkBtVbj7q7xRSiWOyojQJkT9UxhNHZx+lfddLtel jltuQg0G7J143dSCa/d9MzwvvHZHMXEYKfHG6S60= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, syzbot+e113a0b970b7b3f394ba@syzkaller.appspotmail.com, Christian Brauner , Todd Kjos , Jann Horn , Sasha Levin Subject: [PATCH 5.8 193/633] binder: Remove bogus warning on failed same-process transaction Date: Tue, 27 Oct 2020 14:48:56 +0100 Message-Id: <20201027135531.729146503@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135522.655719020@linuxfoundation.org> References: <20201027135522.655719020@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jann Horn [ Upstream commit e8b8ae7ce32e17a5c29f0289e9e2a39c7dcaa1b8 ] While binder transactions with the same binder_proc as sender and recipient are forbidden, transactions with the same task_struct as sender and recipient are possible (even though currently there is a weird check in binder_transaction() that rejects them in the target==0 case). Therefore, task_struct identities can't be used to distinguish whether the caller is running in the context of the sender or the recipient. Since I see no easy way to make this WARN_ON() useful and correct, let's just remove it. Fixes: 44d8047f1d87 ("binder: use standard functions to allocate fds") Reported-by: syzbot+e113a0b970b7b3f394ba@syzkaller.appspotmail.com Acked-by: Christian Brauner Acked-by: Todd Kjos Signed-off-by: Jann Horn Link: https://lore.kernel.org/r/20200806165359.2381483-1-jannh@google.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/android/binder.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/android/binder.c b/drivers/android/binder.c index af85d37aef680..adab46ca5dff7 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c @@ -2324,8 +2324,6 @@ static void binder_transaction_buffer_release(struct binder_proc *proc, * file is done when the transaction is torn * down. */ - WARN_ON(failed_at && - proc->tsk == current->group_leader); } break; case BINDER_TYPE_PTR: /* -- 2.25.1