Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2496277imm; Mon, 24 Sep 2018 05:28:31 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZiHraHvCHPdiGqzKgfGDKGTKprv4U27yBufpe34Us3BiWsXQCAR2tFKrHXODdUJLCys8kz X-Received: by 2002:a62:1e81:: with SMTP id e123-v6mr10167804pfe.24.1537792111292; Mon, 24 Sep 2018 05:28:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537792111; cv=none; d=google.com; s=arc-20160816; b=EAhFntpfVvnrpScposaUNGGJY9znsPEtFCUeKSLaIW4XGzdNHgCLdnQgzt/bcrDCl/ 7wGaX3ZZbjvBjbR7jZDoiHuJNeR68bnCr0TWBpSxhPme6pGsvcrQ1KfAlbwcar3KUqv4 Myqd/2efkyGRTCb7cLABmW2d7JkSqLn9ThU1lm3rcMbBvw1onxdrXG61m89g4RoqPc0T 0iUp+V6BgnKMnaehtM5dJIqhlzWyG8dU4xUTazS7+X8gFmHzRqJqkxJDE5pXDBxfl5WW 2qq+NSueSAdHrSINT6d9703GnSUjtweT1YDi0k+CWW9jpMqdoBu+LJGTs9hIRV/txvSA cO/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=9zR2bVvU0QT3Y0kz45dZFd0gD+bWWRYqzKOM7futxl0=; b=kgu/LhG2DJz6mMLOuiSTo3f3116a8i1AMDDGa9T0jv7CIVrkqqshGfJ+1pN+Onld0R 8+qL5TFbx+igN0YRU18VawodSvLannc7idLqfLDN732vmojBIDkwMuretcycXXWQ1rKG bu9L4NKLfx/5ys/KKzhitCVHVQ+VI7Z95l1pm8qYo91nVVOISGCZ+QcbxgHHirtgfBJI EJBvuFvsDy4m2gPaXkyGhnbLXUpib2MrdMCAp90+S72vqeskdQPzllcuHDbQoA5RZbnf YdMBcxQIT7O0ccO9L3MOmc4inKTIiUEQqvLrn3Ecv1OYdDhoJYW02bzD/DPpYpM+m/r0 KiCg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f4-v6si33415065plr.213.2018.09.24.05.28.15; Mon, 24 Sep 2018 05:28:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733240AbeIXS3A (ORCPT + 99 others); Mon, 24 Sep 2018 14:29:00 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:57218 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730526AbeIXS3A (ORCPT ); Mon, 24 Sep 2018 14:29:00 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 0DF281094; Mon, 24 Sep 2018 12:27:05 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Roi Dayan , Maor Gottlieb , Saeed Mahameed Subject: [PATCH 4.18 013/235] net/mlx5: Fix not releasing read lock when adding flow rules Date: Mon, 24 Sep 2018 13:49:59 +0200 Message-Id: <20180924113105.740944115@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180924113103.999624566@linuxfoundation.org> References: <20180924113103.999624566@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Roi Dayan [ Upstream commit 071304772fc747d5df13c51f1cf48a4b922a5e0d ] If building match list fg fails and we never jumped to search_again_locked label then the function returned without unlocking the read lock. Fixes: bd71b08ec2ee ("net/mlx5: Support multiple updates of steering rules in parallel") Signed-off-by: Roi Dayan Reviewed-by: Maor Gottlieb Signed-off-by: Saeed Mahameed Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c @@ -1797,6 +1797,8 @@ search_again_locked: if (err) { if (take_write) up_write_ref_node(&ft->node); + else + up_read_ref_node(&ft->node); return ERR_PTR(err); }