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 0A9C9A0540; Wed, 6 Jul 2022 11:07:30 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EFF4A40A89; Wed, 6 Jul 2022 11:07:29 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 9845740A7F for ; Wed, 6 Jul 2022 11:07:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657098448; x=1688634448; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=qmwU/n43YfsoYJBRM+mCn6FO2EPxvtQ6g037jjuTwoE=; b=I+iPjBJDT9UoRSzYckIgDgn9PXzFD2M1tdpXB61NCKa09QssqYktknQ0 81qFai7mNTuxHG/hG5l+QLz1xOrvPySFT/THpEvfDCAvUU+LQV60RVr8o +eDMD2t9rE2Yo8W/nhfdJ2Xtkf/ng1s1TEDX8t6ZwD//PpyIJlBGXjITS 0S5/UMYP/VZMQcomgy+EXRrEdsPZr6Dkg8m4fpCc/F4WuGp4f57UP3Tvm lvnoMeZ3UjDbMnVFm4Htu8oB76uQhp2E92/zD4z6GlbKe/FzdCMlbcXT3 gByChZJ/FePxEXxfmF/ICjbi7UBkGtxCASB2u/Pk7nx6fxXd5sWwI7ifE g==; X-IronPort-AV: E=McAfee;i="6400,9594,10399"; a="282441545" X-IronPort-AV: E=Sophos;i="5.92,249,1650956400"; d="scan'208";a="282441545" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jul 2022 02:07:27 -0700 X-IronPort-AV: E=Sophos;i="5.92,249,1650956400"; d="scan'208";a="543316526" Received: from bricha3-mobl.ger.corp.intel.com ([10.55.133.37]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 06 Jul 2022 02:07:26 -0700 Date: Wed, 6 Jul 2022 10:07:22 +0100 From: Bruce Richardson To: 835703180@qq.com Cc: dev@dpdk.org Subject: Re: [PATCH V2] 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 Wed, Jul 06, 2022 at 02:55:48PM +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