From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Burakov, Anatoly" Subject: Re: [PATCH] ipc: fix undefined behavior in no-shconf mode Date: Wed, 24 Oct 2018 11:20:47 +0100 Message-ID: <59545f64-3fff-b046-d212-f134fe55de77@intel.com> References: <20181024100517.17494-1-dariusz.stojaczyk@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: stable@dpdk.org To: Darek Stojaczyk , dev@dpdk.org Return-path: In-Reply-To: <20181024100517.17494-1-dariusz.stojaczyk@intel.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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