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 0C583A09E8 for ; Tue, 8 Dec 2020 14:39:19 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0578EA3; Tue, 8 Dec 2020 14:39:18 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by dpdk.org (Postfix) with ESMTP id 43540A3 for ; Tue, 8 Dec 2020 14:39:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1607434754; 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=BEN28+VePuFFvHi8BfuQVw2bAXGHMNUT8W3qXCGjHzw=; b=L5dMgUAI/sIF/0g1/f87vCVk+86Rf1keHCdv1t2nJlL6k2iXkL38CirT4Z4Y8HFkT3hMDe g3fGPEeof7c49yfO9MoxxY747fHxQryrWnmvAajMIcC0Ay3v/H85mwV12479ZBrWPm9W6R kG7jgK+eJY2L/Rpb2mhtaeFyOAFFWi4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-393-AXX1zWIWN5uO45LEBqYqgA-1; Tue, 08 Dec 2020 08:39:13 -0500 X-MC-Unique: AXX1zWIWN5uO45LEBqYqgA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 34626107ACE3; Tue, 8 Dec 2020 13:39:12 +0000 (UTC) Received: from [10.36.114.230] (ovpn-114-230.ams2.redhat.com [10.36.114.230]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3EA9A5D6AB; Tue, 8 Dec 2020 13:39:10 +0000 (UTC) To: Viacheslav Ovsiienko , stable@dpdk.org Cc: shirik@nvidia.com References: <1607431712-3444-1-git-send-email-viacheslavo@nvidia.com> From: Kevin Traynor Message-ID: <3b575968-747a-7be6-e8a1-474ea7aaf0ef@redhat.com> Date: Tue, 8 Dec 2020 13:39:10 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <1607431712-3444-1-git-send-email-viacheslavo@nvidia.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ktraynor@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-stable] [PATCH v2] [18.11] net/mlx5: fix xstats reset reinitialization X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" On 08/12/2020 12:48, Viacheslav Ovsiienko wrote: > From: Shiri Kuzin > > [ upstream commit 42dcd453d9b63841a5460a6ca3872eb7648d73bd ] > > The mlx5_xstats_reset clears the device extended statistics. > In this function the driver may reinitialize the structures > that are used to read device counters. > > In case of reinitialization, the number of counters may > change, which wouldn't be taken into account by the > reset API callback and can cause a segmentation fault. > > This issue is fixed by allocating the counters size after > the reinitialization. > > Fixes: a4193ae3bc4f ("net/mlx5: support extended statistics") > > Reported-by: Ralf Hoffmann > Signed-off-by: Shiri Kuzin > Acked-by: Matan Azrad > --- > drivers/net/mlx5/mlx5_stats.c | 17 ++++++++++++++--- > 1 file changed, 14 insertions(+), 3 deletions(-) Applied, thanks.