Received: by 10.192.165.156 with SMTP id m28csp79788imm; Tue, 10 Apr 2018 16:52:31 -0700 (PDT) X-Google-Smtp-Source: AIpwx48wLuCQUUhHZLhj3y1JqeD+a3v9APXD6ahCECLI+OroZJCRnmmwY0UzDBmy2n99Vc8ycAYP X-Received: by 2002:a17:902:3181:: with SMTP id x1-v6mr2579420plb.2.1523404351417; Tue, 10 Apr 2018 16:52:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523404351; cv=none; d=google.com; s=arc-20160816; b=AyreTjf9KXk//kJskdbftlw0FZS0gtOF+ybNivB7UkQelXltoFsU7ImCIAAh2fttlY UlxilRrJ1DYFFwLhtdiJ8YPR8dINh4jRydwL1XJIEsXGpCjC/inB6B6xo86LDjAyIen1 SkMWpDu7o/xqu16bhZzXE84FyIw1hvEdjxGHH3y5+BZBlvuHA0qfRPkEPDdhfZ9eHP1Q R6TRI48UgFln9wtr1p/2iXYKIBhbz+8SC5vlcvPODMrzg0aYMNwomSDx5uDgRZKMyD5P itIOQgM7mc+rscXuAooyRIYT3mee1kscLl3hhRGYTFy825gGiNXrzW3PdMgc8bwLJjkQ ysCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=5oMlC43IYOKjEsCqfZFAeVn+eEz3bgWq9OIZq3PaGnI=; b=B5KLaiDDEsaYdN0TN93y6akro7hkrjJP9/QPpdZa/iY92g8eKAfB+1YtNTEFsvjATD DPKWZgJM/R9A5gzcXKXFNlZz3bimgKMoFUhFRVbQtcz/pJtYkduzFZ5Fchs0B2bHyCQ1 G0m5hCL9ZLB+xNMAaSCHF6deta6M8D6k5aR3dxmqjeYxSD+QX5RQjlIAwq297PJBnbbX zDwunaU3JWpAFd+2RMzs671jMksu5Ct7SAw3erBGzdc8BZdLgkOI2Rk/m+PXq/2oFX2o 2+QzXwzQ6lRhHQ+KYiDCm362QF55g8czosXBbvu47UfRdSEWVH7K7OG0/mOx/kkpVDw/ Y5Hg== 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 ba2-v6si3700787plb.110.2018.04.10.16.51.55; Tue, 10 Apr 2018 16:52: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 S1752521AbeDJWYd (ORCPT + 99 others); Tue, 10 Apr 2018 18:24:33 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:36764 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752401AbeDJWYb (ORCPT ); Tue, 10 Apr 2018 18:24:31 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 9AB33D0B; Tue, 10 Apr 2018 22:24:30 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Marcin Kabiesz , Cong Wang , "David S. Miller" Subject: [PATCH 4.16 17/18] net_sched: fix a missing idr_remove() in u32_delete_key() Date: Wed, 11 Apr 2018 00:23:52 +0200 Message-Id: <20180410212759.488967528@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180410212758.564682823@linuxfoundation.org> References: <20180410212758.564682823@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.16-stable review patch. If anyone has any objections, please let me know. ------------------ From: Cong Wang [ Upstream commit f12c643209db0626f2f54780d86bb93bfa7a9c2d ] When we delete a u32 key via u32_delete_key(), we forget to call idr_remove() to remove its handle from IDR. Fixes: e7614370d6f0 ("net_sched: use idr to allocate u32 filter handles") Reported-by: Marcin Kabiesz Tested-by: Marcin Kabiesz Signed-off-by: Cong Wang Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/sched/cls_u32.c | 1 + 1 file changed, 1 insertion(+) --- a/net/sched/cls_u32.c +++ b/net/sched/cls_u32.c @@ -489,6 +489,7 @@ static int u32_delete_key(struct tcf_pro RCU_INIT_POINTER(*kp, key->next); tcf_unbind_filter(tp, &key->res); + idr_remove(&ht->handle_idr, key->handle); tcf_exts_get_net(&key->exts); call_rcu(&key->rcu, u32_delete_key_freepf_rcu); return 0;