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=-8.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 17C6AC5519F for ; Wed, 18 Nov 2020 22:27:31 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5EEAD246DC for ; Wed, 18 Nov 2020 22:27:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="bBMe49pW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5EEAD246DC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6E5176E4CA; Wed, 18 Nov 2020 22:27:29 +0000 (UTC) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id AFCF46E4CA for ; Wed, 18 Nov 2020 22:27:27 +0000 (UTC) Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (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 7EDF2246DC; Wed, 18 Nov 2020 22:27:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1605738447; bh=94UdQ2k5CQSg/1Sgfe2lKi2FCJuR7P7/YYX3gXoXjV4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=bBMe49pWRvdeGVL+4JZmH932PP/E4wl9kdxyjoz/amhz+ik+Ae+SNEpmTxW0MfJMr 1kD0vxhiYRiW+apqUA09XvjsRdznxKGOcQK0XzmnE6ICiZL2TQUGzm7vCPCL5UTfnv mk0vq1e0KkT5QUu0BYBa7amj3lDXscL4yWDKV7go= Date: Wed, 18 Nov 2020 14:27:25 -0800 From: Andrew Morton To: christian.koenig@amd.com Subject: Re: [PATCH 1/2] mm: mmap: fix fput in error path v2 Message-Id: <20201118142725.aa4678810546c70520dd5d74@linux-foundation.org> In-Reply-To: References: <20201106114806.46015-1-christian.koenig@amd.com> <20201106114806.46015-2-christian.koenig@amd.com> <20201106144811.cf228ca9278ec78887d42960@linux-foundation.org> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Christian =?ISO-8859-1?Q?K=F6nig?= , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, linux-mm@kvack.org, linux-media@vger.kernel.org Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Wed, 18 Nov 2020 11:57:44 +0100 Christian K=F6nig wrote: > Am 06.11.20 um 23:48 schrieb Andrew Morton: > > On Fri, 6 Nov 2020 12:48:05 +0100 "Christian K=F6nig" wrote: > > > >> Patch "495c10cc1c0c CHROMIUM: dma-buf: restore args..." > >> adds a workaround for a bug in mmap_region. > >> > >> As the comment states ->mmap() callback can change > >> vma->vm_file and so we might call fput() on the wrong file. > >> > >> Revert the workaround and proper fix this in mmap_region. > >> > > Seems correct, best I can tell. Presumably all ->mmap() instances will > > correctly fput() to original file* if they're rewriting vma->vm_file. > = > Yes, exactly. > = > Patch #2 provides a helper to make sure that everybody gets the = > get_file()/fput() correctly while updating vma->vm_file. > = > Can I add your acked-by to the patches and push them upstream through = > drm-misc-next? Please go ahead. Acked-by: Andrew Morton _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel