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.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 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 E3024C61DD8 for ; Fri, 13 Nov 2020 18:31:14 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 709A9206E0 for ; Fri, 13 Nov 2020 18:31:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 709A9206E0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id B5E356B0036; Fri, 13 Nov 2020 13:31:13 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id AE7EC6B006E; Fri, 13 Nov 2020 13:31:13 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9D5976B0078; Fri, 13 Nov 2020 13:31:13 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0099.hostedemail.com [216.40.44.99]) by kanga.kvack.org (Postfix) with ESMTP id 6DBC16B0036 for ; Fri, 13 Nov 2020 13:31:13 -0500 (EST) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 15D90180AD802 for ; Fri, 13 Nov 2020 18:31:13 +0000 (UTC) X-FDA: 77480237226.07.quill40_2c1213027311 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin07.hostedemail.com (Postfix) with ESMTP id EF6011803F9A9 for ; Fri, 13 Nov 2020 18:31:12 +0000 (UTC) X-HE-Tag: quill40_2c1213027311 X-Filterd-Recvd-Size: 3600 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by imf13.hostedemail.com (Postfix) with ESMTP for ; Fri, 13 Nov 2020 18:31:11 +0000 (UTC) IronPort-SDR: RpLhuQTWHrDIbMf409k6EFV8wfTdzH1R+gN0t4o/OzU3B4y1gCbG6aeKwtgjYHGzoIOeeVbr0j cYeBUehBtQEA== X-IronPort-AV: E=McAfee;i="6000,8403,9804"; a="255223654" X-IronPort-AV: E=Sophos;i="5.77,476,1596524400"; d="scan'208";a="255223654" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Nov 2020 10:31:09 -0800 IronPort-SDR: RdsImr+0BIfBRTiHcRWzA7YA/RX73RTlodY8/OL7HxjIXQGvM2HMpynS2haLRPM914t195EQlg mn/8oeeDYEtA== X-IronPort-AV: E=Sophos;i="5.77,476,1596524400"; d="scan'208";a="542748483" Received: from iweiny-desk2.sc.intel.com (HELO localhost) ([10.3.52.147]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Nov 2020 10:31:08 -0800 Date: Fri, 13 Nov 2020 10:31:08 -0800 From: Ira Weiny To: Dennis Dalessandro Cc: jgg@ziepe.ca, dledford@redhat.com, Jann Horn , linux-rdma@vger.kernel.org, Mike Marciniszyn , linux-mm@kvack.org, Jason Gunthorpe Subject: Re: [PATCH for-rc v2] IB/hfi1: Move cached value of mm into handler Message-ID: <20201113183108.GA709632@iweiny-DESK2.sc.intel.com> References: <20201112025837.24440.6767.stgit@awfm-01.aw.intel.com> <20201112171439.GT3976735@iweiny-DESK2.sc.intel.com> <20201113003357.GW3976735@iweiny-DESK2.sc.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.1 (2018-12-01) 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: On Fri, Nov 13, 2020 at 08:37:39AM -0500, Dennis Dalessandro wrote: > On 11/12/2020 7:33 PM, Ira Weiny wrote: > > So I think the final point is the key to fixing the bug. Keeping any > > current->mm which is not the one we opened the file with... (or more > > specifically the one which first registered memory). In some ways this may be > > worse than before because technically the parent could open the fd and hand it > > to the child and have the child register with it's mm. But that is ok > > really... May just be odd behavior for some users depending on what operations > > they do and in what order. > > I don't think that's worse than before. 'worse' was a bad word... sorry. I just meant that the new code opens up the opportunity to get it to work with the child when this is really not the way I the API was intended... But now I am just bike shedding... ;-) > Before we were letting it operate on > the wrong mm. That's so much worse. Yes, parent could open fd and hand it > off, which is OK. The "odd" behavior is up to whoever wrote the user space > code to do that in the first place. > > > [1] Also, you probably should credit Jann for the idea with a suggested by tag. > > Will change reported-by to suggested-by. Ah yea both are appropriate. I'm not an expert on if both should be tagged or not... But to me it seems suggested-by is a bit stronger because a solution was provided beyond just a bug reported. Ira > > -Denny >