Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7D19DC636D4 for ; Thu, 2 Feb 2023 08:18:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230218AbjBBIST (ORCPT ); Thu, 2 Feb 2023 03:18:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232087AbjBBISB (ORCPT ); Thu, 2 Feb 2023 03:18:01 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E5772125; Thu, 2 Feb 2023 00:17:59 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id F0E8861262; Thu, 2 Feb 2023 08:17:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D26A6C433EF; Thu, 2 Feb 2023 08:17:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675325878; bh=VL4fAkecV4GQl3WJ8gbv7uvwm7Jw16xjo0h4lh1ehZk=; h=From:To:Cc:In-Reply-To:References:Subject:Date:From; b=iTepDxk69Uth1kyoxJo/FnfP66C4TiRa2TgFfxmqKA97KKteDCj60+UDY3QssMNMz MEtzf6+/ZOrwBqX89NvDoYLBHE5oz9HSMQZZo0cLNZCO8WvMenbrQVtyDAkOV7cHU5 8NFl3pj5DhqXGjNg4/60F3dGM8e/ODZlytkPE+qKvGfs6Wrtb84nwlcchqlyfip6aE wQXF0wXx1ksozat4v6ZGHJ73d6JXKdro6IFtkY8aYTsMlasGa8MmLMcYWLY30Jtf6d AE9pskDl9N3vB+8DIg8GxkEljxN9+0hDzhuJ6gwddtQFfri+6xTdh5Nuz+P0n9uGnu kwzK2naH+bfCg== From: Leon Romanovsky To: Potnuri Bharat Teja , Nikita Zhandarovich Cc: Jason Gunthorpe , Roland Dreier , Vipul Pandya , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org In-Reply-To: <20230201172103.17261-1-n.zhandarovich@fintech.ru> References: <20230201172103.17261-1-n.zhandarovich@fintech.ru> Subject: Re: [PATCH] RDMA/cxgb4: add null-ptr-check after ip_dev_find() Message-Id: <167532587398.1948948.4522751668670208427.b4-ty@kernel.org> Date: Thu, 02 Feb 2023 10:17:53 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Mailer: b4 0.12-dev-a055d Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 01 Feb 2023 09:21:03 -0800, Nikita Zhandarovich wrote: > ip_dev_find() may return NULL and assign it to pdev which is > dereferenced later. > Fix this by checking the return value of ip_dev_find() for NULL > similar to the way it is done with other instances of said function. > > Found by Linux Verification Center (linuxtesting.org) with SVACE. > > [...] Applied, thanks! [1/1] RDMA/cxgb4: add null-ptr-check after ip_dev_find() https://git.kernel.org/rdma/rdma/c/ef42520240aacf Best regards, -- Leon Romanovsky