Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp120212ybk; Tue, 19 May 2020 17:14:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQdqBSTL4aecuFJhVl4yJHmejhmUNpspXME9dLFij4dsO7T4B3Rr9dM6RUcpmDpXhJYOxO X-Received: by 2002:a17:906:860a:: with SMTP id o10mr1553799ejx.250.1589933697592; Tue, 19 May 2020 17:14:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589933697; cv=none; d=google.com; s=arc-20160816; b=r1B9tApdjVs/ZvaWZIB3swJT2xPYdUbWxRJHH/F4sf5hjAAB9liERmVpE5FLL1rN4A 89/2D82p/J8/B8MlA8ePKvSFmuR73ljEwe6sh6Bkh9qyfnBGX2Y4cz5GHAcgxAMZ2Q0H T38EBRqFmnUaIYEIyyaNspQoQMzp5PJEP9+XqMSbBwj+B6w4qzySSxQ0P7JduQuhPyr1 2gz4jptDSLXH5fF0qBfz8rvpRB92uAO+qAy5JDDiqvTWJCcOwgOZ90ZBavjaHSRLKiPi ga8gOrTf8iOvBTK9UYGUWrBvN03RpJQGw8wQknGAUKct3GfOc9MfkVbxRbARXY1PPfUr nxNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=1nnNMMnWgVyddSvx9CTHRp85r+Uj2T/EgMi8iim52iY=; b=LJhATs70VsuQJ9rlg550v2Ab770TU/66sAR/5QW97ubX8QXmcawdRsySQiILR4e9y2 +e91y8QjQy21VbMAAjjHPI5BlXZNSB6GerNnCP0eMF65eaPv8CPA0a94VNF/owrB0XUn wlKyvQFEaS+XmjBUjHxQxw1hro0f07uQa/MtRdtdW3oo8O0osJYOMlI8sp9+ymYsWIJq zosYhZfvMM3+YQzTqYSaz/Li9swKBMWu6SoSqVB94uKx7SJcWNQiLy+0qIGQFGNTkWw1 mjBxkPstYSEG2yPmNTsNBRj07MEHlPxLcxhAWum6VaVS5P72iqkS+fGE533kD3noJyGq 0dTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b="LVb/LnYE"; 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 v5si827336ejg.711.2020.05.19.17.14.29; Tue, 19 May 2020 17:14:57 -0700 (PDT) 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=@ziepe.ca header.s=google header.b="LVb/LnYE"; 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 S1728085AbgETAKr (ORCPT + 99 others); Tue, 19 May 2020 20:10:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35222 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726898AbgETAKr (ORCPT ); Tue, 19 May 2020 20:10:47 -0400 Received: from mail-qv1-xf43.google.com (mail-qv1-xf43.google.com [IPv6:2607:f8b0:4864:20::f43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EAB6CC061A0F for ; Tue, 19 May 2020 17:10:46 -0700 (PDT) Received: by mail-qv1-xf43.google.com with SMTP id f89so552271qva.3 for ; Tue, 19 May 2020 17:10:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=1nnNMMnWgVyddSvx9CTHRp85r+Uj2T/EgMi8iim52iY=; b=LVb/LnYEoZe/hqO2/o5y+SCwpWFlcD/OzI++bhVo7RKZq90uUz9gmoGH+/45X+MDte 9Itf5OW4Cc0+8iNIsEp9QldXccLCYOOXxe57Sm1cHCDdjlfkgY+6MWzPqdPE0N5W6sVJ UngYpYZ+SFTMFjtCSYMyEMMwIJffklZXje5JNDyn8tYKYQ9YG5zlcqBdqHOfU0oQ9Uw9 sXxDcISZGRbopbiyyH/7otZAIWj0g9hDoVNxGs8EVQgDkvbjYdF0GJMDl1atusMM+kci maK30q1hgpUahvg+JY+rRdll417il1WAMpgiGnih61Jo9t2HhRiV5twbf75SYKTXX2NG LrQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=1nnNMMnWgVyddSvx9CTHRp85r+Uj2T/EgMi8iim52iY=; b=bBd7fO6BosotIC++L/bQzatuOSuT9CtzjQpzJnI2KkGsGEo5+NeOFpvk1X8kfCX9HF lXHIWQY58xA0XVt+l450EZ2khRneOdV9BhL3/yEBO1K96Fi4+HkH7oILOQORijI87Nva iR5HuV3jgpKQvWvf623IT1xnHfHgVn0Gg4WDVo7NOGpfbtTlzYZ39a+1b9CdrC3tzZMK WD/7GCvcXSfkCMSXkQMfBacOXKn08Rvq1Zkf67eEjniw8JEsHD1Bc5MSThOTSQgrZrWg HxeTTjVD8PSOh10x1/1p68mUWy6n2/wZr3Nt9SP7Xqfk2uia1Eb9JfxarPesd2ZrmO8W XB9Q== X-Gm-Message-State: AOAM533MxWovWN3LuMBOShVreXyuZNL7d4sJGgldRDHnR68z/5bcp4R7 O4H6duDFH4f4NdgfHHUvThBUVg== X-Received: by 2002:a05:6214:42f:: with SMTP id a15mr2302980qvy.170.1589933446165; Tue, 19 May 2020 17:10:46 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-156-34-48-30.dhcp-dynamic.fibreop.ns.bellaliant.net. [156.34.48.30]) by smtp.gmail.com with ESMTPSA id d196sm959328qkg.16.2020.05.19.17.10.45 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 May 2020 17:10:45 -0700 (PDT) Received: from jgg by mlx.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1jbCJp-0003It-Am; Tue, 19 May 2020 21:10:45 -0300 Date: Tue, 19 May 2020 21:10:45 -0300 From: Jason Gunthorpe To: Divya Indi Cc: linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, Kaike Wan , Gerd Rausch , =?utf-8?B?SMOla29u?= Bugge , Srinivas Eeda , Rama Nichanamatlu , Doug Ledford Subject: Re: [PATCH 1/2] IB/sa: Resolving use-after-free in ib_nl_send_msg. Message-ID: <20200520001045.GA31189@ziepe.ca> References: <1588876487-5781-1-git-send-email-divya.indi@oracle.com> <1588876487-5781-2-git-send-email-divya.indi@oracle.com> <20200508000809.GM26002@ziepe.ca> <33fc99e2-e9fc-3c8c-e47f-41535f514c2d@oracle.com> <20200513150021.GD29989@ziepe.ca> <272dbe83-a72b-d38b-6993-d3bbda50a7d1@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <272dbe83-a72b-d38b-6993-d3bbda50a7d1@oracle.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 19, 2020 at 04:30:52PM -0700, Divya Indi wrote: > Hi Jason, > > I wanted to follow up to see if you got a chance to review the following reply? Not yet, it still seems bad to be doing code like this. If two threads are sharing memory they really need to use a refcount/kref not rely on some sketchy thing with flags. It is very hard to tell if the sketchy thing with flags is correct or not. Jason