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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no 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 6CE56C433DB for ; Tue, 2 Feb 2021 07:05:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2D18E64EE2 for ; Tue, 2 Feb 2021 07:05:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232441AbhBBHEz (ORCPT ); Tue, 2 Feb 2021 02:04:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232429AbhBBHEd (ORCPT ); Tue, 2 Feb 2021 02:04:33 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8A96C061573; Mon, 1 Feb 2021 23:03:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=tBP6AtIkMrM+Ev+R7wP7xBQMTerQ6VlEXrvmiPe+MLs=; b=MALRJpA5D6Md9oQRdFOJ2QLDzX 6lrzxsVryKxlxjPJDrfyR08pgBFY2XL7QGu1RBfmVpjG9zvuMqQxneIaX9dZEnjyGefb6FcrzgxzE o3XxbovGKbOC4mJjqTkQOERYx2O5rk5P2gjCfoo2DAZe+vCxZV8g4DMxpN0qalCI/hpDhvOVm4lgN mxPa1gZptd7rhi3wN5/s8xy2skHCMadcF2yZBTOAUkOyE6CmrljZwmGI1XsoLCrOx4/AVZe/B95Cn 88eo9tsaesh1izZGrAPszUYqrMbwdxhU+EOQJrX7ELc6q4vtMjs0Q4az36G/y7JpAsCm6MNnwc8ku HPXAWDzw==; Received: from hch by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1l6piq-00Epu1-L3; Tue, 02 Feb 2021 07:03:36 +0000 Date: Tue, 2 Feb 2021 07:03:36 +0000 From: Christoph Hellwig To: Suren Baghdasaryan Cc: Minchan Kim , Christoph Hellwig , Sumit Semwal , "(Exiting) Benjamin Gaignard" , Liam Mark , labbott@redhat.com, Brian Starkey , John Stultz , Christian K??nig , Chris Goldsworthy , ??rjan Eide , Robin Murphy , James Jones , Hridya Valsaraju , Sandeep Patil , linux-media , DRI mailing list , "moderated list:DMA BUFFER SHARING FRAMEWORK" , LKML , kernel-team Subject: Re: [PATCH 1/1] dma-buf: heaps: Map system heap pages as managed by linux vm Message-ID: <20210202070336.GA3535861@infradead.org> References: <20210128083817.314315-1-surenb@google.com> <20210128091348.GA1962975@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org IMHO the BUG_ON(vma->vm_flags & VM_PFNMAP); in vm_insert_page should just become a WARN_ON_ONCE with an error return, and then we just need to gradually fix up the callers that trigger it instead of coming up with workarounds like this.