From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7CCAAA0542; Tue, 5 Jul 2022 12:15:08 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 68AB640691; Tue, 5 Jul 2022 12:15:08 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 5C6E34021D for ; Tue, 5 Jul 2022 12:15:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657016107; x=1688552107; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=a6KvuELDLwpSHYU1H/5n27qvZY2qDX378tKUSl2HxKo=; b=a7DQBQkmIWiT25f9yYehDAV/vso5P5L++tQR9SxvcP4uA/OyLTVtQwYd 1fO+DJyc3U4fwAQLIHne/EUn6oaDGRgesLN8G/1NREoT9PPUiRgnbDFwI aK7Bxhe5w1FbhGXtrIENqH36SIjcEmdlvQSjIHxzTLWz5+m0eDm23CCni WUja9amn14TJg0ZIhVbqsLvAU0i/61nhmR0z9+q7CyPUrTdwOMotFaT11 ham0LxR2co9wAMZ6XDKwhq43isk8ANb5hQd4+W+d2h+kCQ1EH5RvWZgjK fy2VNfAWq5IZmg98YwcMh68CmCYI2TNEv0ZCIGSNL7NmH8l0PFJb5nBjq g==; X-IronPort-AV: E=McAfee;i="6400,9594,10398"; a="266340367" X-IronPort-AV: E=Sophos;i="5.92,245,1650956400"; d="scan'208";a="266340367" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jul 2022 03:15:02 -0700 X-IronPort-AV: E=Sophos;i="5.92,245,1650956400"; d="scan'208";a="650059668" Received: from bricha3-mobl.ger.corp.intel.com ([10.55.133.37]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 05 Jul 2022 03:15:01 -0700 Date: Tue, 5 Jul 2022 11:14:58 +0100 From: Bruce Richardson To: 835703180@qq.com Cc: dev@dpdk.org Subject: Re: [PATCH] raw/ioat: Check for the NULL pointer after calling malloc Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Tue, Jun 28, 2022 at 01:52:26AM +0800, 835703180@qq.com wrote: > From: Shiqi Liu <835703180@qq.com> > > As the possible failure of the malloc(), the not_checked and > checked could be NULL pointer. > Therefore, it should be better to check it in order to avoid > the dereference of the NULL pointer. > > Fixes: b7aaf417f93 ("raw/ioat: add bus driver for device scanning automatically") > > Signed-off-by: Shiqi Liu <835703180@qq.com> Acked-by: Bruce Richardson