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=-11.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 9D4F5C87FDD for ; Thu, 2 Sep 2021 16:30:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9A65461214 for ; Thu, 2 Sep 2021 16:11:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346168AbhIBQMJ (ORCPT ); Thu, 2 Sep 2021 12:12:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:48842 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346047AbhIBQMG (ORCPT ); Thu, 2 Sep 2021 12:12:06 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A9F3D61211; Thu, 2 Sep 2021 16:11:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1630599068; bh=1SIgbTHl3TWh3Oz1ABpRYB4HoSLhHO7T9v0BsHWdffk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=p+A9q1wMeQDYnwBdBT1oZ62NIsS6cwi1tl6nk984SOmSA5s2MiLiSuLsG47NfV+dS zoUwlLbJgEDm0s3wSgh90YHacDq7j96FEIgUIr7qvhVVtccCTv4hZAxpdcjUOiNFtf UghD9TFbdc6uNESnX5KfF5GhwL3Wl2Giu9qDaMZY= Date: Thu, 2 Sep 2021 18:11:05 +0200 From: Greg KH To: Todd Kjos Cc: Martijn Coenen , Christian Brauner , Arve =?iso-8859-1?B?SGr4bm5lduVn?= , "open list:ANDROID DRIVERS" , LKML , Martijn Coenen , Joel Fernandes , kernel-team@android.com, stable Subject: Re: [PATCH] binder: make sure fd closes complete Message-ID: References: <20210830195146.587206-1-tkjos@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 02, 2021 at 08:35:35AM -0700, Todd Kjos wrote: > On Tue, Aug 31, 2021 at 12:24 AM Martijn Coenen wrote: > > > > On Mon, Aug 30, 2021 at 9:51 PM 'Todd Kjos' via kernel-team > > wrote: > > > > > > During BC_FREE_BUFFER processing, the BINDER_TYPE_FDA object > > > cleanup may close 1 or more fds. The close operations are > > > completed using the task work mechanism -- which means the thread > > > needs to return to userspace or the file object may never be > > > dereferenced -- which can lead to hung processes. > > > > > > Force the binder thread back to userspace if an fd is closed during > > > BC_FREE_BUFFER handling. > > > > > > Signed-off-by: Todd Kjos > > Reviewed-by: Martijn Coenen > > Please also add to stable releases 5.4 and later. I'll try to remember to tag this as-such after 5.15-rc1 is out and I can apply it to my tree. But in the future, it's best if you add the cc: stable to the patch yourself so I don't have to do it "by hand" after the fact. thanks, greg k-h