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 E718DA04DB; Thu, 10 Dec 2020 16:42:40 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 02CFBC980; Thu, 10 Dec 2020 16:42:39 +0100 (CET) Received: from mail-yb1-f195.google.com (mail-yb1-f195.google.com [209.85.219.195]) by dpdk.org (Postfix) with ESMTP id 35688C950; Thu, 10 Dec 2020 16:42:36 +0100 (CET) Received: by mail-yb1-f195.google.com with SMTP id w139so5116078ybe.4; Thu, 10 Dec 2020 07:42:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=nclNAHUIMf3mkcW+xt5Mz1/HEQbnkcDmmiAs1L3esL4=; b=ShuC1zOPjDoF6RfIpR+8gor3knmSwnOzEbL2SD9ujCXMcFsrzJHetEagS7SFWR2DVi li6xfAGwrBPrb0iZgeXWH1gp8IqX5QSbJYgMGIDOxMA58GrZqp3WmJ9kiaUOukzIp9Cr BAFZ4hDOGGbHnKX7R0JOlxUrKnrRKCDFjCleLzWIGTmtFl1mpk72/LyepTX6wrV02IxJ Yy5v2nANLjP23ILeHJMwBEf94ZkYT7mpN6B4uIrzvyUxDyZVnkd/ZMrF1auTNuRcL3DO Cstfs6e0Ihzf6b2my8gU2DVbvK6zaT6kq9Hnjh6SoXETPZ07Ug5jRfdP6RcjuxABpJMC +icg== 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=nclNAHUIMf3mkcW+xt5Mz1/HEQbnkcDmmiAs1L3esL4=; b=Kb+fNnzSi0INYIgcJVJQ0kttrmFn+MeS7xUtJw67cfqDhNZGfp6N7lwYylShCnExnt 6CnjZlKYat4ZZ0LHVDRiar1LoniptS9eUy9Fd8aynZFr7QdVnRWEMVkbFX/BKBnGOPFb l4wpwUiWh1zoEI94c1QUFGQ7QXxzn2I9UJvtzmzLCygJgSgOG4BXXG3RDBaUSFLEMyRC goxWAbl4KoHL2LRqBpXhBKxHUuaEZ9Hc5qSW24q+LT2xsKmHg4YA1IeimQyo1a855SY2 19ayM2MwYXoep2kbonfQgVPsME2R3hjlA7AzaL96nDQoj2jvy37nti9Vt3INu4hZUg6Y 1y2g== X-Gm-Message-State: AOAM530Fb0Rr/rgQWeCIIf8PFGwccJF8A0c80tLllrktzlMQp6WxiPgz LqbvmrIdDqJuvSj+3Pwwpb/he7dSQfopHnPUHEA= X-Google-Smtp-Source: ABdhPJzzmSmz1QQW/PV9H7F+JHeBryb+R7uAPQUXIZvb5arlABJHQNLfv+SN79ZiupYeDOHcb42rYnOx+xd2QVZ7wCI= X-Received: by 2002:a25:5052:: with SMTP id e79mr12095994ybb.51.1607614954618; Thu, 10 Dec 2020 07:42:34 -0800 (PST) MIME-Version: 1.0 References: <20201209192233.6518-1-ajit.khaparde@broadcom.com> <20201209235347.16180-1-ajit.khaparde@broadcom.com> <20201209235347.16180-8-ajit.khaparde@broadcom.com> In-Reply-To: <20201209235347.16180-8-ajit.khaparde@broadcom.com> From: Lance Richardson Date: Thu, 10 Dec 2020 10:42:23 -0500 Message-ID: To: Ajit Khaparde Cc: dev@dpdk.org, stable@dpdk.org Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v3 07/17] net/bnxt: fix cleanup on mutex init failure 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 Wed, Dec 9, 2020 at 6:56 PM Ajit Khaparde wrote: > > In case mutex init fails during initialization, start cleanup and > fail the initialization process. > > Fixes: a73b8e939f10 ("net/bnxt: fix race between start and interrupt handler") > Cc: stable@dpdk.org > > Signed-off-by: Ajit Khaparde > --- > drivers/net/bnxt/bnxt_ethdev.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c > index 33358779b..0b14ca234 100644 > --- a/drivers/net/bnxt/bnxt_ethdev.c > +++ b/drivers/net/bnxt/bnxt_ethdev.c > @@ -4739,8 +4739,10 @@ bnxt_init_locks(struct bnxt *bp) > } > > err = pthread_mutex_init(&bp->def_cp_lock, NULL); > - if (err) > + if (err) { > PMD_DRV_LOG(ERR, "Unable to initialize def_cp_lock\n"); > + return err; > + } > > err = pthread_mutex_init(&bp->health_check_lock, NULL); > if (err) > -- > 2.21.1 (Apple Git-122.3) > Acked-by: Lance Richardson