Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1923694yba; Mon, 15 Apr 2019 00:55:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqwcFUnjuNRGUw6nflmYzpUu8V+2yeCZfGP6p02ot5nJv8tmJZAy1pkxkj9fYTmDd58tai8o X-Received: by 2002:a63:4a5a:: with SMTP id j26mr68674371pgl.361.1555314955839; Mon, 15 Apr 2019 00:55:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555314955; cv=none; d=google.com; s=arc-20160816; b=XJ1G9p3M9bX1lfIyvBggm9ujvKjT7uhm02IBqn/EBH+oq8T5e0oqRuV5e2O0IfqmJb emxDmyVX2hYpl/eb5Lmy6Nc0AkNWCKqyHDioWpCY402Hp2dFGd7t8cnPa3hWhSNGmoUQ HCRkSZn+YxoHNujkltS2icBcEH5SdA0LAxY6XJBhtmqgjk5i34xGIBH7fqe6/rZjwUrh 4/ZXkrmP7+xqXuZQWyQ4tJ7C5hsmlrc8HU5AQYWyo7djOLH42E7cYAPwNxKdsuaBqCm5 Ns7UR3wA0jitPfKIxjFqhRoh6n47+YOE4DBxc6wR/ofBrkxTL+zUO0vUBTzn83Wb+Hf8 WxiA== 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; bh=oyUjfVUFHxf0f+C1omuCizFcItPmVtOyqUO41+dBGOc=; b=pWsDTR4OQSEubhRkAt3myF4LWdKYmV46IPHe2injjUqQjtGzzcwZmMfXbyUNMWSIQn Poq/bME1Z0NhGwK4cY0BNwchzLurMdImia8GbD4dJKbM4D1+9CK8V9pOgI7b2zbHxnQb 1o+tUYKONrTDWsXlf6obtcYwNoXCqHgZdDzr0nVpXhY/1mutC2pQ2juvyF+PtZtdVTky KgvsQw11tAYvkrN4+tfM73fdZ19plFGHlN7qfzpXt7WzR15VSWt0VDYLgw5YEq4JcsnP moYydRbSMzeOJ79BnNz4LwL1lx1tNGw2ztcEndEbLPeORKiZDCCmbuMdLdqHHA10z0iI vWRg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z8si35669220pgf.593.2019.04.15.00.55.39; Mon, 15 Apr 2019 00:55:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726441AbfDOHxu (ORCPT + 99 others); Mon, 15 Apr 2019 03:53:50 -0400 Received: from stargate.chelsio.com ([12.32.117.8]:46958 "EHLO stargate.chelsio.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725796AbfDOHxt (ORCPT ); Mon, 15 Apr 2019 03:53:49 -0400 Received: from localhost (mehrangarh.blr.asicdesigners.com [10.193.185.169]) by stargate.chelsio.com (8.13.8/8.13.8) with ESMTP id x3F7rhuV019429; Mon, 15 Apr 2019 00:53:44 -0700 Date: Mon, 15 Apr 2019 13:23:38 +0530 From: Potnuri Bharat Teja To: Colin King Cc: Doug Ledford , Jason Gunthorpe , "linux-rdma@vger.kernel.org" , "kernel-janitors@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] RDMA/cxgb4: fix null pointer dereference on alloc_skb failure Message-ID: <20190415075336.GA26935@chelsio.com> References: <20190413160026.5873-1-colin.king@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190413160026.5873-1-colin.king@canonical.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Saturday, April 04/13/19, 2019 at 21:30:26 +0530, Colin King wrote: > From: Colin Ian King > > Currently if alloc_skb fails to allocate the skb a null skb is passed > to t4_set_arp_err_handler and this ends up dereferencing the null skb. > Avoid the null pointer dereference by checking for a null skb and > returning early. > > Addresses-Coverity: ("Dereference null return") > Fixes: b38a0ad8ec11 ("RDMA/cxgb4: Set arp error handler for PASS_ACCEPT_RPL messages") > Signed-off-by: Colin Ian King > --- > drivers/infiniband/hw/cxgb4/cm.c | 2 ++ > 1 file changed, 2 insertions(+) > Thanks, Acked-by: Potnuri Bharat Teja