Message ID | 20201009075934.3509076-14-daniel.vetter@ffwll.ch (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=0lZN=DQ=kvack.org=owner-linux-mm@kernel.org> Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1EC7E1580 for <patchwork-linux-mm@patchwork.kernel.org>; Fri, 9 Oct 2020 08:00:31 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id BDDCE22269 for <patchwork-linux-mm@patchwork.kernel.org>; Fri, 9 Oct 2020 08:00:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b="iRqcoi2J" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BDDCE22269 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id EE6906B007E; Fri, 9 Oct 2020 04:00:12 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id E1C816B0080; Fri, 9 Oct 2020 04:00:12 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D0C3A6B0081; Fri, 9 Oct 2020 04:00:12 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0144.hostedemail.com [216.40.44.144]) by kanga.kvack.org (Postfix) with ESMTP id A584A6B007E for <linux-mm@kvack.org>; Fri, 9 Oct 2020 04:00:12 -0400 (EDT) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 4A334180AD806 for <linux-mm@kvack.org>; Fri, 9 Oct 2020 08:00:12 +0000 (UTC) X-FDA: 77351639064.07.fifth22_1905ee4271df Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin07.hostedemail.com (Postfix) with ESMTP id 297301803F9AC for <linux-mm@kvack.org>; Fri, 9 Oct 2020 08:00:12 +0000 (UTC) X-Spam-Summary: 1,0,0,babb7b7a7d3323fe,d41d8cd98f00b204,daniel.vetter@ffwll.ch,,RULES_HIT:41:152:355:379:541:800:960:968:973:988:989:1260:1277:1311:1313:1314:1345:1359:1431:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:3138:3139:3140:3141:3142:3352:3865:3866:3867:3868:3870:3871:3872:3874:4321:4401:5007:6261:6653:6742:10004:10400:11658:11914:12043:12297:12517:12519:12555:12895:12986:13069:13311:13357:13846:13894:14181:14394:14659:14721:21080:21444:21451:21627:21990:30054:30064:30089:30090,0,RBL:209.85.128.65:@ffwll.ch:.lbl8.mailshell.net-66.201.201.201 62.8.0.100;04ygb37jn8xnjttk4c8zcwrry5ie4ypj7jadyi54hujbomjrqm3dxmknpfi8wbs.ztyxboc1854f4ygnisonoc7m48b8pfh73j9t7xjpz6kro5y4pte6tthgtzygsj4.o-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:23,LUA_SUMMARY:none X-HE-Tag: fifth22_1905ee4271df X-Filterd-Recvd-Size: 4801 Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by imf43.hostedemail.com (Postfix) with ESMTP for <linux-mm@kvack.org>; Fri, 9 Oct 2020 08:00:11 +0000 (UTC) Received: by mail-wm1-f65.google.com with SMTP id f21so8842505wml.3 for <linux-mm@kvack.org>; Fri, 09 Oct 2020 01:00:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ybAifwX7tm2P00t2K95NUlLTVV/59iglzyZOopNSY4g=; b=iRqcoi2J+8TbvYv/OI6gZry2qWJjsQLn24G4kqdeeRuUA+0H9YClu5xZhMUQNcmsMG JPS6JPnqs6Bk/zroCRZ/wHG6IvC2ZDGDlX/Z457NYm+VvK3sD2Y2DmyMs0uQyILuAN0N 24HSnEGcXQk//4F2Y2Z5Ww4FDBcpxX8FuiubM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ybAifwX7tm2P00t2K95NUlLTVV/59iglzyZOopNSY4g=; b=Odf5T3TZEBIw8Mtg8uBFAJVaMmfgFs5yBAob3f7m/1AwqX/ioDcEhUXN6XWUuahBUi 6nqjolYBMKBzzN0B0umQiqwWUv70lWEvPJW7O60hZVkEsckq22xGJgjmnk3PFkUG0Oso 26EPjFAPrQYSyi0MV3MqX9oFsjGjbHb6d75CLETxCQXgIioeVz7vI9IRlm7hbx2JvAm7 kgkBvmIGkNhAOciTrbIZqcemA1nnkGmuIoxmjMAy1/ij33O3qojQw/M4Y5K3iKN9tCcf 15mCFvpBeuzruA4UMJaccT8G0t3MfQuYolQ0ixOwqb/oORgzhGRcR+skQ5bVZ2NnShOr LINg== X-Gm-Message-State: AOAM531yrzDqXQCU9W9h1FbtC7lqFNOemDe1RwMGs4EzcKzfPhTn/+BD 1rPLnfc3Y5cE9HIKR53lTF1cwg== X-Google-Smtp-Source: ABdhPJz/a+ItIs4nZkG5GhoSduiU6qGLoEKHXdDdLg7sXZkEX3DpeqBcVWskPvNGNUhuSuQAqMr6Cg== X-Received: by 2002:a7b:c01a:: with SMTP id c26mr11729750wmb.35.1602230410816; Fri, 09 Oct 2020 01:00:10 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id u17sm11634118wri.45.2020.10.09.01.00.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Oct 2020 01:00:10 -0700 (PDT) From: Daniel Vetter <daniel.vetter@ffwll.ch> To: DRI Development <dri-devel@lists.freedesktop.org>, LKML <linux-kernel@vger.kernel.org> Cc: kvm@vger.kernel.org, linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-media@vger.kernel.org, linux-s390@vger.kernel.org, Daniel Vetter <daniel.vetter@ffwll.ch>, Daniel Vetter <daniel.vetter@intel.com>, Jason Gunthorpe <jgg@ziepe.ca>, Kees Cook <keescook@chromium.org>, Dan Williams <dan.j.williams@intel.com>, Andrew Morton <akpm@linux-foundation.org>, John Hubbard <jhubbard@nvidia.com>, =?utf-8?b?SsOpcsO0bWUgR2xpc3Nl?= <jglisse@redhat.com>, Jan Kara <jack@suse.cz> Subject: [PATCH v2 13/17] /dev/mem: Only set filp->f_mapping Date: Fri, 9 Oct 2020 09:59:30 +0200 Message-Id: <20201009075934.3509076-14-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201009075934.3509076-1-daniel.vetter@ffwll.ch> References: <20201009075934.3509076-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> |
Series |
follow_pfn and other iomap races
|
expand
|
diff --git a/drivers/char/mem.c b/drivers/char/mem.c index abd4ffdc8cde..5502f56f3655 100644 --- a/drivers/char/mem.c +++ b/drivers/char/mem.c @@ -864,7 +864,6 @@ static int open_port(struct inode *inode, struct file *filp) * revocations when drivers want to take over a /dev/mem mapped * range. */ - inode->i_mapping = devmem_inode->i_mapping; filp->f_mapping = inode->i_mapping; return 0;
When we care about pagecache maintenance, we need to make sure that both f_mapping and i_mapping point at the right mapping. But for iomem mappings we only care about the virtual/pte side of things, so f_mapping is enough. Also setting inode->i_mapping was confusing me as a driver maintainer, since in e.g. drivers/gpu we don't do that. Per Dan this seems to be copypasta from places which do care about pagecache consistency, but not needed. Hence remove it for slightly less confusion. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Cc: Jason Gunthorpe <jgg@ziepe.ca> Cc: Kees Cook <keescook@chromium.org> Cc: Dan Williams <dan.j.williams@intel.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: John Hubbard <jhubbard@nvidia.com> Cc: Jérôme Glisse <jglisse@redhat.com> Cc: Jan Kara <jack@suse.cz> Cc: Dan Williams <dan.j.williams@intel.com> Cc: linux-mm@kvack.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Cc: linux-media@vger.kernel.org --- drivers/char/mem.c | 1 - 1 file changed, 1 deletion(-)