Received: by 10.192.165.156 with SMTP id m28csp56605imm; Tue, 10 Apr 2018 16:18:19 -0700 (PDT) X-Google-Smtp-Source: AIpwx48oszxsYy+bt4cgvutvPrMODSawiwl2Dw6jNlRSdybvIoyr1e1BK1A6ewH21xXGHxa453mp X-Received: by 2002:a17:902:6b07:: with SMTP id o7-v6mr2457534plk.136.1523402299468; Tue, 10 Apr 2018 16:18:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523402299; cv=none; d=google.com; s=arc-20160816; b=rC/KkPXFFLx/ZKozCWy83AkJ3b18OFFWZDygLjw7KoGWATbeImeG8BtwV/VloPVXkD eXp5pGbmdzgg0wwer8b+6RMscqVwIh+NAZen9xEQecreFb7ME6KznEmfLcDyQtYMT93V Jly+5pqJ4pKmgpGhZxbVK94OUECvQg/azr9HSSgs94xNBIiE1gb3fQbATmdOk5v7Pzjt zFHmfRNmXmClBxCzpPXUHXFueb/v+Ng7ZvXgCmK+/gfWz2eyU0kjh1sH2WiMVlBtemgQ DSE+t57vwu7zw3ByHTvI4iD8f41vWzV+CsRrpKn8uWl1efhuyow2BE/9UVmWO19sDLqe BMcQ== 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=l6GCdkd8gtDjFwmVyiH88Wv6N0vO+wEEWf3FC8RaBTw=; b=rLSwoSZB/Sp2Leeel56vbh3FUdbrWaabdg/jZ5sMCQtVnT6NGs/uTsfyoqVadU/Qw9 e4dVBgSfLotsRlueLNHzGxY4R0NfFaR7rUFxd27ANUiUxz8Y5CtNCJLwqOtgU1jgOX5Z qrhrScGOU9u+Epf+jLrb6lixypuTOOQ4BGzvDaSoitaOpevfN/+1od8B09pQIv60QsIs eCAe0vUej3iExJ9qXcALKPG3+XnCSworx070d2+nxz3PsMo24nbkGW3eLJz99+taCB6z U82P/J5Mp0UzucB8evbMPtVV1kq4Vgoe33IG2WSzr9LZVYoFbZN5gQ9SFMpozqX0t72A pAeQ== 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 f13si2395326pgv.415.2018.04.10.16.17.42; Tue, 10 Apr 2018 16:18:19 -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 S1755891AbeDJXMu (ORCPT + 99 others); Tue, 10 Apr 2018 19:12:50 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:40972 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755032AbeDJWcd (ORCPT ); Tue, 10 Apr 2018 18:32:33 -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 B650B8BF; Tue, 10 Apr 2018 22:32:32 +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.15 150/168] net_sched: fix a missing idr_remove() in u32_delete_key() Date: Wed, 11 Apr 2018 00:24:52 +0200 Message-Id: <20180410212807.458895663@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180410212800.144079021@linuxfoundation.org> References: <20180410212800.144079021@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.15-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 @@ -478,6 +478,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;