Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp609599pxb; Thu, 15 Apr 2021 02:14:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy4Ba1X1dBSIVRI5LrShD8AYxYxXf/jEPdIVxHxtCjFR6mu74uIRNxBUBUPY2jEFrm8wpKL X-Received: by 2002:a05:6402:447:: with SMTP id p7mr2928617edw.89.1618478080401; Thu, 15 Apr 2021 02:14:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618478080; cv=none; d=google.com; s=arc-20160816; b=HCM/9ffV/0PdHZm1dxgJRiVNT5PpsepGPoBvP+DSIn1RCr33dAh9ZGu6siXEcTZQ9y /mXD7Up6v63fGuAKVanY24CmBr+aZguWmrxvT9tm8r0LFEzmFNW0Z4vJwhC+ymVbXszt vr00MkS2PVdiKYcWY1MfTbnHQzQB9jCoUy1+5VhrQ9Nt3GPMRkC3IqakgIm/7MGd+g6X KZ8Zi2GXSFQfpYZ7HzIMLXUg8xixHvDIWNnv/tVqM4F9zIOVkAojZbhPTGag4PhugizO UxVxwQed+MP7gpAEghEsCP0fYOcSBZTCZCPkL/QDocLDSUPhLUdjO9zcU4/783eBMMQV FVhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=s4I87uFNmq9mrPB0x7Dr0WdSAOdLDGSO1KngNJol8XE=; b=tN3HiyLCwjZLebl61BVQh+TBBFh8qPyIBaL5cqqloun9V6p8hmlOmawbbsjAJNJzdQ yzh1i86B7Anp7XEFH/O8I/kjpfqeLTXfO1gWKusR+kOCyB7upogJlF1lPlHUX7puLPdw kqmHv5FVmYlejNFhLUELcDNmv5ciCkZ837BK7FRMUFZsJy5VdsQXQ3izHi8eCKdRcoqq i8+7JAijBhFhbIQvOAYt8ZKQa/qNl7yJ607uK6HHVH9somWxvtYWAQbibJsU9I236B2+ 6XtZgCsxGTCAdU9U3HeAFwjhmsEld2OWnnLNmi4YfbN2UtW8RwFYIi3MLbx4Ys/qOhrz y2uw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m9si1879050edq.499.2021.04.15.02.14.16; Thu, 15 Apr 2021 02:14:40 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232030AbhDOJNK (ORCPT + 99 others); Thu, 15 Apr 2021 05:13:10 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:39419 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231622AbhDOJNJ (ORCPT ); Thu, 15 Apr 2021 05:13:09 -0400 Received: from 1.general.cking.uk.vpn ([10.172.193.212]) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lWy3J-0002hA-6U; Thu, 15 Apr 2021 09:12:45 +0000 Subject: Re: [PATCH][next] can: etas_es58x: Fix potential null pointer dereference on pointer cf To: Marc Kleine-Budde Cc: Wolfgang Grandegger , "David S . Miller" , Jakub Kicinski , Vincent Mailhol , Arunachalam Santhanam , linux-can@vger.kernel.org, netdev@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210415085535.1808272-1-colin.king@canonical.com> <20210415090314.vvyvr2wihwnauyi6@pengutronix.de> From: Colin Ian King Message-ID: Date: Thu, 15 Apr 2021 10:12:44 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <20210415090314.vvyvr2wihwnauyi6@pengutronix.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 15/04/2021 10:03, Marc Kleine-Budde wrote: > On 15.04.2021 09:55:35, Colin King wrote: >> From: Colin Ian King >> >> The pointer cf is being null checked earlier in the code, however the >> update of the rx_bytes statistics is dereferencing cf without null >> checking cf. Fix this by moving the statement into the following code >> block that has a null cf check. >> >> Addresses-Coverity: ("Dereference after null check") >> Fixes: 8537257874e9 ("can: etas_es58x: add core support for ETAS ES58X CAN USB interfaces") >> Signed-off-by: Colin Ian King > > A somewhat different fix is already in net-next/master > > https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=e2b1e4b532abdd39bfb7313146153815e370d60c +1 on that > > Marc >