From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 63D4C1B117; Wed, 24 Oct 2018 12:20:51 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Oct 2018 03:20:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,420,1534834800"; d="scan'208";a="84035392" Received: from aburakov-mobl1.ger.corp.intel.com (HELO [10.237.220.99]) ([10.237.220.99]) by orsmga008.jf.intel.com with ESMTP; 24 Oct 2018 03:20:48 -0700 To: Darek Stojaczyk , dev@dpdk.org Cc: stable@dpdk.org References: <20181024100517.17494-1-dariusz.stojaczyk@intel.com> From: "Burakov, Anatoly" Message-ID: <59545f64-3fff-b046-d212-f134fe55de77@intel.com> Date: Wed, 24 Oct 2018 11:20:47 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20181024100517.17494-1-dariusz.stojaczyk@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] ipc: fix undefined behavior in no-shconf mode X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2018 10:20:52 -0000 On 24-Oct-18 11:05 AM, Darek Stojaczyk wrote: > In no-shconf mode the rte_mp_request_sync() wasn't initializing > the `reply` parameter, which contained e.g. a number of sent > requests. Callers of rte_mp_request_sync() might check that > param afterwards and might read potentially unitialized memory. > > The no-shconf check that makes us return early (with rc = 0) was > placed before the `reply` initialization. Fix this by making the > `reply` initialization occur first. > > Fixes: 5848e3d2813c ("ipc: support --no-shconf mode") > Cc: anatoly.burakov@intel.com > Cc: stable@dpdk.org > > Signed-off-by: Darek Stojaczyk > --- Acked-by: Anatoly Burakov -- Thanks, Anatoly