Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp695648ybt; Wed, 17 Jun 2020 11:28:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzaRootlQyKIKYPQGSVWv3gIkSc53KzfARexp3dJBxCKJA5b/hNDMytg1YaF2qNZM/+hei6 X-Received: by 2002:a17:906:3745:: with SMTP id e5mr442617ejc.19.1592418525046; Wed, 17 Jun 2020 11:28:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592418525; cv=none; d=google.com; s=arc-20160816; b=Lml4pgIcx/Orb2fl6xeS4nrcCiS7I97YjkSqEcGiq8R6klFrk86BMlt0mX5/7WIn4X qNYGebPXoM0sNAVneSx936HIXaYcwvPGGsQWngKz3wIbojwy05iT92uGybM49VfQNMsk 70WE0yxC4v/q+Z0h+Oj0TLgiRqrPbXAdp9apdpDwHEbSNJW1l6wmjilNUNmtub/6YSk5 cTsVBoYqJwRVGCl/XowDqFM83QchSNsdOwAbckp9Mw6YdUBVx28sM2RS3xkqwaKLBJKY iWdEiX8rHuBYAkXSJtjunxYiaRa6L/JVDCd5wlfw0x81InC8QneALEBEG+Vr8YO8K1Ez u84w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Xvbq06xb8rcHDasNPx3O6hTHbslpfoh+riHjhZc++Ks=; b=xnEOFPy0F4hMeLyx5na2+UQ8U08WBvTd/e7ahcaDvqU1l5j41+sJOBl02Ygk+/nI/a XpkgslUVD+TS7vDSScPd5N7fhdgz0uAdoHcJAmScB+ZdEMPSJCpmcNm7Zq/kqcxV0UnI 83MznlPLqmHmcQ3nuyOkwlCPW1V7dYb3Up+YlJL7vkbDBbfcklnhcRNrmDjPbJhyMVfr pa4Dh0Q2ethWrZUH+m94zIgRliidRZngYVzby0s8/JjDs6unnH+h2HGZys9dzQMaJGYz GHX64xSsjoPW07meVVjufnytXiQmKcBC7lOe2X42meXVYvuMuhF7CTlBXFJNFQqCUdPt +riA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=WSLMCKM9; 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 n18si485166edq.195.2020.06.17.11.28.22; Wed, 17 Jun 2020 11:28:45 -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=WSLMCKM9; 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 S1728040AbgFQSY5 (ORCPT + 99 others); Wed, 17 Jun 2020 14:24:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727787AbgFQSYO (ORCPT ); Wed, 17 Jun 2020 14:24:14 -0400 Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2ED4C061755 for ; Wed, 17 Jun 2020 11:24:14 -0700 (PDT) Received: by mail-pl1-x643.google.com with SMTP id v24so1319957plo.6 for ; Wed, 17 Jun 2020 11:24:14 -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; bh=Xvbq06xb8rcHDasNPx3O6hTHbslpfoh+riHjhZc++Ks=; b=WSLMCKM9ohtqSjMVQAbj8K1EAqWViQgK5qGsYkx3lqhl4SsxwYlRNFiMWoOk2e/+22 zbFaMYhRiSmM6eMiCRg8pVMnNvBNXK4RWHAEyeSxi1yul8/hoKqqDvYCbK4MJMaUDIp8 dPW7u7MTXphGIS/lQQK1TTO+1xUR9WezeUktbJn90euKvKx8q2ojaylC5nuI1hd4V9Vh wtgE1cx4svZZDf92ll3QVr+I4cvK9FEfJ17p/5L/qNhvs9lrf33cvYerJdTG+R9G5cGw v9PZqBGUocA8ZmLvw+z3PCKOn4YYh3CH80/GsBlNE3wl4MqQ/Wk7DLhl0/f5pMepE3sL y2YQ== 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; bh=Xvbq06xb8rcHDasNPx3O6hTHbslpfoh+riHjhZc++Ks=; b=WKBTKJKsKZbqr5dX4vnLr7/XZ+A1Fct+H3GhzQy0FIZb7NwIVk57NRLmrCtkxud7HP hyNFgFUpx29LNw8JwqMbJggT2UwEJd8hjOEgJGBeARAj93yfLH04quY5nlfB9VE/G8wA YZsrqjIDmVgYg1csaxbuk22brkVSUs3d566bVBNAYTFgq8jRzeTwt95EE7zrxKRXu5yk QTCZfWvrcR/Fxl6yjtMXhepeOHhdC+X79JzEYu05EEhk11fWdBg8pYmFch0l/uXDYO2N KPevswV3kCB0FZzGgji2qLzAop+0fmoffYIWePkQHkE2bRl8+Dbnx1rkWBUsGsJLgEtH fQug== X-Gm-Message-State: AOAM532cmpotXuH03o+p7eA2Vf9trxhtLCw/ooqLyS/bwQzfa7fYh/3l RMV049qu4WjOKD3dlxrJNEnScA== X-Received: by 2002:a17:90a:df0c:: with SMTP id gp12mr363670pjb.148.1592418252950; Wed, 17 Jun 2020 11:24:12 -0700 (PDT) Received: from ziepe.ca ([206.223.160.26]) by smtp.gmail.com with ESMTPSA id h8sm516409pfo.67.2020.06.17.11.24.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jun 2020 11:24:12 -0700 (PDT) Received: from jgg by mlx with local (Exim 4.93) (envelope-from ) id 1jlcjK-009iJG-KI; Wed, 17 Jun 2020 15:24:10 -0300 Date: Wed, 17 Jun 2020 15:24:10 -0300 From: Jason Gunthorpe To: Divya Indi Cc: Leon Romanovsky , 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 v3] IB/sa: Resolving use-after-free in ib_nl_send_msg Message-ID: <20200617182410.GK6578@ziepe.ca> References: <1591627576-920-1-git-send-email-divya.indi@oracle.com> <1591627576-920-2-git-send-email-divya.indi@oracle.com> <20200609070026.GJ164174@unreal> <20200614064156.GB2132762@unreal> <09bbe749-7eb2-7caa-71a9-3ead4e51e5ed@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <09bbe749-7eb2-7caa-71a9-3ead4e51e5ed@oracle.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 16, 2020 at 10:56:53AM -0700, Divya Indi wrote: > The other option might be to use GFP_NOWAIT conditionally ie > (only use GFP_NOWAIT when GFP_ATOMIC is not specified in gfp_mask else > use GFP_ATOMIC). Eventual goal being to not have a blocking memory allocation. This is probably safest for now, unless you can audit all callers and see if they can switch to GFP_NOWAIT as well Jason