Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp686416pxb; Wed, 18 Nov 2020 14:33:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJxZEvwY8G655k8Xsf3aGzK5zmbRbf+BJZia5YUyOh6I4DQanD7xRi4zMyKLNhI5cp+oVdrz X-Received: by 2002:a17:906:f10e:: with SMTP id gv14mr25544380ejb.346.1605738795445; Wed, 18 Nov 2020 14:33:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605738795; cv=none; d=google.com; s=arc-20160816; b=QFv+g0sb/ah9WLOaPGEMgMOr9fc7NArYh0BGM2g5ZWAIlO69m5IIMaqlCan0zwNlpt LbdVKF6zxwzFr6r0rhAw0bvYfHRgiHi8VSAp/yZmFws8+buJsQVjIZYXgoI53x5Mwc3B DIuY9e9YauTAhCiW1wBc1Ic57nWt4+khSlP0QYdWnPXYBMP9l2R2VTn1Xe/QQskd2Szl zNU3eAtoMiJcSZ8XGPKNxPdKFO/PnqESx0w0SxdmDnRFcdASMOCnCiEV/oJZKlPT37xx Hb03jcdNuMcFOkSvKefveTdK0K/JVDjdbAEOoT9WZQB+AuK3Kg0QbnqQ67FRJrCNNXni hkZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=BNJt9/D8t4akX/GXZFeIMGSPIUn0wP+wZ+fnGObNiqs=; b=QOZxHjCJKTKuNpPm07gKIIoZF0wp9QOUJRFu8XOomTVWmVB07CSntXm40Jnzd104Do nl4LiCxp1P397gDDMQ27CdD1y8TFzxPfXsVbfuBdT2Bq3kzus2sWlGr1jyCHObuG7D53 ZOO/X4vS6rIeBpIZaQWfk73BU2OqDlGzcbc/7JJEBzCXPEBFg/gFfUBEO7Twf/XVijJS Wpj97wQDR3ccXEWr3GTt+Y/mrLUf1v4G4hptx+OiavMHpkyEn9aKTkkKFPrtmAqIA2am QLlIRMsOTR5B1vxRiVYTc52itwgU2+vqVySzm0xf8GAG0oqcVhYCWPjb6edgiOKQegRT I3uA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=bBMe49pW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v10si16704411ede.131.2020.11.18.14.32.50; Wed, 18 Nov 2020 14:33:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=bBMe49pW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726666AbgKRW11 (ORCPT + 99 others); Wed, 18 Nov 2020 17:27:27 -0500 Received: from mail.kernel.org ([198.145.29.99]:44514 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725948AbgKRW11 (ORCPT ); Wed, 18 Nov 2020 17:27:27 -0500 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 Cc: Christian =?ISO-8859-1?Q?K=F6nig?= , linux-mm@kvack.org, linux-kernel@vger.kernel.org, linaro-mm-sig@lists.linaro.org, dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org 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 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. >=20 > Yes, exactly. >=20 > Patch #2 provides a helper to make sure that everybody gets the=20 > get_file()/fput() correctly while updating vma->vm_file. >=20 > Can I add your acked-by to the patches and push them upstream through=20 > drm-misc-next? Please go ahead. Acked-by: Andrew Morton