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 8C39FC55ABD for ; Fri, 13 Nov 2020 18:31:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4E961206E0 for ; Fri, 13 Nov 2020 18:31:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726092AbgKMSbJ (ORCPT ); Fri, 13 Nov 2020 13:31:09 -0500 Received: from mga01.intel.com ([192.55.52.88]:43188 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726081AbgKMSbJ (ORCPT ); Fri, 13 Nov 2020 13:31:09 -0500 IronPort-SDR: LlgwLaW5+HsH5lZJxUZ10x2lSecGKDS7y0AzaPA35nFO/8sQ/I4zylzatGadHMIXysfNgLlTEv 8rJSHZQx/5AQ== X-IronPort-AV: E=McAfee;i="6000,8403,9804"; a="188533795" X-IronPort-AV: E=Sophos;i="5.77,476,1596524400"; d="scan'208";a="188533795" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.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) Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org 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 >