Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp671356pxk; Wed, 2 Sep 2020 11:39:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6ttU71Yz+qTWsZJBEfzjfyAJb033bmD3J6N/6Kb37fAFe1yoGD3lg40mm2MIB5A67HoAv X-Received: by 2002:a50:aa94:: with SMTP id q20mr1379480edc.119.1599071956275; Wed, 02 Sep 2020 11:39:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599071956; cv=none; d=google.com; s=arc-20160816; b=z81wDG5LQR7iKiw05plb06xHAwylU2Q5lJd68wFS562hunj+cIkrQ06Zm7JEX+KaGQ I4WCOieZH4F302MfSHTnX0D1A6HnlRMTPJ+8CQmSFAt71k6/D2XuUdzhSwhigXu15o5j TAw50zb6X0UYBhTYakL9Qva0k3wFCwKF8vvsr6mXYZTEasXs+88VnGOH2RRcgj9KnIoq GSkpAsim21fJ9qMwwF7NCj1l9ftHkyC51FpmzFiUkx7lnb7Lg9Cwx9oPJ4Wls2Vm+Sth PCyfbtzPEfPdkbCgWsQzkRUjBbFTcdDyvRS3GzNRX7yBTbgsiPjux6zTf60fGaS883ny HEpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=S6Z2xaVjmlodHauxQ5mehcuqINHEaGeiKzrCdTCeOKQ=; b=DLEIjED9x9w4VueYYCy2/neQzZHCWpzz+r7KsKY/bAXgdxM/xE8C8wBfJXU1QmMq9h H4ctb7nuM3OV1nRKxMsU4AEWRlgkNGjtkgdOVzrROnAHGTypJE7gsWo2XNSpWTocZ86r w05TTIsbVCTWoMc3KS2jNSRLPEiPPSbEMZTe5LfxJVIHnz06hMAFPrRKCeVpH9SGqQ40 CZu0VvIuzsRWKuiUMdeb/GF7Wk8g8Pe49HQwLav6ervJMfCBHtmXZrCQqg1GDkwTVHy+ 1o6NT9gBO7XKLnPZOWZuO2Bhihb8KdeKGgBQs0SPG5WiyzC2y1vbEVI5JaskvUxptEEn w8+A== ARC-Authentication-Results: i=1; mx.google.com; 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 dk14si69990edb.61.2020.09.02.11.38.33; Wed, 02 Sep 2020 11:39:16 -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; 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 S1728069AbgIBSfa (ORCPT + 99 others); Wed, 2 Sep 2020 14:35:30 -0400 Received: from www62.your-server.de ([213.133.104.62]:52144 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726567AbgIBSfa (ORCPT ); Wed, 2 Sep 2020 14:35:30 -0400 Received: from sslproxy06.your-server.de ([78.46.172.3]) by www62.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1kDXbR-0004oI-74; Wed, 02 Sep 2020 20:35:25 +0200 Received: from [178.196.57.75] (helo=pc-9.home) by sslproxy06.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kDXbQ-000VRx-Uj; Wed, 02 Sep 2020 20:35:24 +0200 Subject: Re: [PATCH][next] xsk: fix incorrect memory allocation failure check on dma_map->dma_pages To: Colin King , =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= , Magnus Karlsson , Jonathan Lemon , "David S . Miller" , Jakub Kicinski , Alexei Starovoitov , Jesper Dangaard Brouer , John Fastabend , netdev@vger.kernel.org, bpf@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org References: <20200902161332.199961-1-colin.king@canonical.com> From: Daniel Borkmann Message-ID: <01a1216b-3b9e-1755-33a2-b491cf48ab8c@iogearbox.net> Date: Wed, 2 Sep 2020 20:35:24 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <20200902161332.199961-1-colin.king@canonical.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.102.4/25918/Wed Sep 2 15:41:14 2020) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/2/20 6:13 PM, Colin King wrote: > From: Colin Ian King > > The failed memory allocation check for dma_map->dma_pages is incorrect, > it is null checking dma_map and not dma_map->dma_pages. Fix this. > > Addresses-Coverity: ("Logicall dead code") > Fixes: 921b68692abb ("xsk: Enable sharing of dma mappings") > Signed-off-by: Colin Ian King Thanks, already applied a fix that was sent earlier [0]. [0] https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/commit/?id=1d6fd78a213ee3874f46bdce083b7a41d208886d