From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 815A3235 for ; Tue, 21 Nov 2017 14:23:47 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 371BA20C87; Tue, 21 Nov 2017 08:23:47 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Tue, 21 Nov 2017 08:23:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux.org; h=cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=aKGf4FMScOCqBbLy8 GERBoIvgmszamRutjgP0ZX6vA0=; b=F6LbFvYw8uDbUs54/U6LVkSYk0BPhccsR Aid1gFeehAK3+Q8ey8p1oW6tXMiN2lytki7+xi5SA2hpyMBcI+NTVU0BkjAoIg3J VVjBWyw9Tp0Kdgh4cDJfoa5hRJavTRaGrTimjm/LL9Icnch29oEzmDG3LktIwi8j 6EN+wrPnlPXZjfWXmRVJa1p46c/EWTkr4JkmwPjpH2uJutT7MGxHpCn5RZtrK7tZ DOvU9B/s9H5zHzOHepcko4x5wFh+esnsUEF0ztPE3Or0FT3y2PHu+sNxNWgcnS+U JQgQvx1WqHeaC75sIhL6C3QkSqLhedFFSBsoULNn7clcInxSN4JPQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=aKGf4FMScOCqBbLy8GERBoIvgmszamRutjgP0ZX6vA0=; b=ZsluIwsy kfIgxT7zvch1vxJtPLman0jz/kbPq191YSqXe3jG4+r68BBLZTakEXutjroZXpSg c+/CehWyw8SEIiKPJW6J+0g8pEdBrtO9zSE1RMf3JTrYBcGiBPyGGysrhCbEuD7E hhyQyKLWbY0Z3pPyM9CMrPu1/2Jtj6AoQ+oXWH7JCfr6p6dm0YyYmS95cKTvat4b NL4iqERvpiRdUy2gWY9/Dvjc4Tp2Q7w272L+3nnhilrvuT1oNfEMQQn4t7PEOhFb qH3T3lqYVOVczAvlLg50DjTGJ6ZNRTEWLfMCYk8MpmVh0TdtBtTP1y1pzfAyMcw1 XDm/HU4qHQ/GQw== X-ME-Sender: Received: from localhost.localdomain (unknown [180.158.62.0]) by mail.messagingengine.com (Postfix) with ESMTPA id E988524810; Tue, 21 Nov 2017 08:23:42 -0500 (EST) From: Yuanhan Liu To: Ajit Khaparde Cc: dpdk stable Date: Tue, 21 Nov 2017 21:16:50 +0800 Message-Id: <1511270333-31002-68-git-send-email-yliu@fridaylinux.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1511270333-31002-1-git-send-email-yliu@fridaylinux.org> References: <1511270333-31002-1-git-send-email-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'net/bnxt: fix interrupt handler' has been queued to stable release 17.08.1 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: , X-List-Received-Date: Tue, 21 Nov 2017 13:23:47 -0000 Hi, FYI, your patch has been queued to stable release 17.08.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/24/17. So please shout if anyone has objections. Thanks. --yliu --- >>From 9d511bba4ba9e231a9bf44dba24968ec34aecdc1 Mon Sep 17 00:00:00 2001 From: Ajit Khaparde Date: Thu, 28 Sep 2017 16:43:42 -0500 Subject: [PATCH] net/bnxt: fix interrupt handler [ upstream commit f7ecea911ec52fc94aba82cc65211e613f8b56df ] In some cases the interrupt handler is accessing cpr, which has already been freed causing segfaults. This patch avoids such accesses. Fixes: 7bc8e9a227cc ("net/bnxt: support async link notification") Signed-off-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_cpr.c | 2 ++ drivers/net/bnxt/bnxt_irq.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/drivers/net/bnxt/bnxt_cpr.c b/drivers/net/bnxt/bnxt_cpr.c index 68979bc..26b2755 100644 --- a/drivers/net/bnxt/bnxt_cpr.c +++ b/drivers/net/bnxt/bnxt_cpr.c @@ -183,8 +183,10 @@ void bnxt_free_def_cp_ring(struct bnxt *bp) return; bnxt_free_ring(cpr->cp_ring_struct); + cpr->cp_ring_struct = NULL; rte_free(cpr->cp_ring_struct); rte_free(cpr); + bp->def_cp_ring = NULL; } /* For the default completion ring only */ diff --git a/drivers/net/bnxt/bnxt_irq.c b/drivers/net/bnxt/bnxt_irq.c index 47cda7e..79a1196 100644 --- a/drivers/net/bnxt/bnxt_irq.c +++ b/drivers/net/bnxt/bnxt_irq.c @@ -55,6 +55,9 @@ static void bnxt_int_handler(void *param) struct cmpl_base *cmp; while (1) { + if (!cpr || !cpr->cp_ring_struct) + return; + cons = RING_CMP(cpr->cp_ring_struct, raw_cons); cmp = &cpr->cp_desc_ring[cons]; -- 2.7.4