From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D91E5A04DD; Tue, 26 Nov 2019 17:28:15 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7290558C3; Tue, 26 Nov 2019 17:28:07 +0100 (CET) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by dpdk.org (Postfix) with ESMTP id 4656D5596 for ; Tue, 26 Nov 2019 17:28:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574785684; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HmUqeVTELPCo3QAmMcDNugRppCF3dGCWD/JBv9eeseg=; b=bpTEDMT1L5+NTN2C6QGihK67OJcLd10Ql/H43w6p6qlebjgNlQmysK80vIMUVEYiJEM4C3 KdT0xxV9MlqFzeXsxZZX1uzbc7ch283J4x5p5cTZ+zymsnibDz2WJapG2lhP3LxPe3OO7L ew1SYQUu8RoFrmAtCTW78qror2MVp1Q= Received: from mail-ua1-f70.google.com (mail-ua1-f70.google.com [209.85.222.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-119-B14ZKe0QMAKLcgHb7OUUTw-1; Tue, 26 Nov 2019 11:28:03 -0500 Received: by mail-ua1-f70.google.com with SMTP id o17so3348030uar.8 for ; Tue, 26 Nov 2019 08:28:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Fa5U5CeJidNc97rmyjY63R36IiYaFxODV4nFPU1Cso4=; b=nPeaN+5s5+b+7IfLwOiZMuK8fmr1aUoRpgf+jAdSjFdeLw8ZsdFo0BioN2/f7vdW9r hKwyeiXNQDTNvdIsjmzMNWF2M/4DzJ+SmLoCvhxXS+6cR5VBbBDhR62iYZQ+75UePvwB JB+EOy0kieXD41PWQ3QshFiPCRUXYTIlRzILVDqiQWFPbeyJhNQBTbMijJjL/wq4IwsY GOTF1POeqBK4kmWU81iNJdAS3GnD653yjSqgYaRnjB2qKnAq1sEwuPx1uyVUKrqKKSkL ZwZU8pHHjKKh8wY+9E+e4v/LGxXvrpNdPB4CYiJ4SPmRl6kXHDfFGmi7HOKFrs+NZQka AnjQ== X-Gm-Message-State: APjAAAXtFiBQYrqnAcL8m2dSJjk+rLDHplMH/4AiUgAnCKIgZhGGDHx+ vOFpjfAWbOezolEejbMubzQ94zNVP7e2oUJrw3pXFk20WnrUlMYLuO/2hB6KBjUMzOU4faNrr7d j4YCeEkwe3MPoyKTzYQc= X-Received: by 2002:a9f:372c:: with SMTP id z41mr1399005uad.87.1574785682201; Tue, 26 Nov 2019 08:28:02 -0800 (PST) X-Google-Smtp-Source: APXvYqw9085do321s/PN50YH5Y9smK4TvWVin0pXDCw2Bn/nBXZOFYmSz4e8jkVLF/VeJstLDGTyCzZIzCuZDnHdksI= X-Received: by 2002:a9f:372c:: with SMTP id z41mr1398982uad.87.1574785681776; Tue, 26 Nov 2019 08:28:01 -0800 (PST) MIME-Version: 1.0 References: <20191125164741.70488-1-bruce.richardson@intel.com> In-Reply-To: <20191125164741.70488-1-bruce.richardson@intel.com> From: David Marchand Date: Tue, 26 Nov 2019 17:27:50 +0100 Message-ID: To: Bruce Richardson Cc: dev X-MC-Unique: B14ZKe0QMAKLcgHb7OUUTw-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH] examples/ioat: fix possible null dereference 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, Nov 25, 2019 at 5:48 PM Bruce Richardson wrote: > > When searching for raw devices with the correct type, we check the driver > name using strcmp, without first checking that the call to info get > succeeded and assigned a value to that pointer. > > If the call to get the device info fails, we can treat it as if the devic= e > didn't match, and continue the loop, so the easiest fix is just to skip t= he > strcmp if the driver_name is null. [A non-null value from a previous fail= ed > match is ok as it too causes the same behaviour of another loop iteration= ]. > > Coverity issue: 350353 > Fixes: 2328542ed84e ("examples/ioat: add rawdev copy mode") > > Signed-off-by: Bruce Richardson Applied, thanks. -- David Marchand