Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5614603imu; Mon, 26 Nov 2018 03:02:28 -0800 (PST) X-Google-Smtp-Source: AFSGD/UQW6pJGQ21jWpgwx/VkqUWa/BS4h6hYsYQEUvdYKseHtun1Z+Qb36qyGXWooNFK/0Xzmtu X-Received: by 2002:a63:6cc:: with SMTP id 195mr24525380pgg.52.1543230148124; Mon, 26 Nov 2018 03:02:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543230148; cv=none; d=google.com; s=arc-20160816; b=HfO4qaSO5oshyJrlfjqXqRjtE0bwrbVllEqc0QCD3cNHPh0Fm9ZA8a72Mxyz+ue9s3 W+hoxHF/WIGnYl+s90mjkaQhDHA7qlJOBvBT3SaJM/oDWv6OYQroVYT/+ME8YJ8lYBW+ rcTSelBR73IJMJd8C7q1cBpCJeqZ0zVKcAN56XsEvZFYTdoejdtDsTvoDe0wEGsn5HwX F1qZG3eU5KLS0uAKEDtewHVw7pIP4hPTNfyONcCMfra6U0OogzrrgrVCx+9LsOq/ajhD lZICP3ulhXMs9hr0reMV7zayVAUSi4fpRYgbIgAAWf3l+gSzOnacs7i6SGbzO+7wqk4Q rmyA== 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:dkim-signature; bh=wOb1SQjcJpIX8iolxwv2JHWqwpgPtizcqmeuBo1CbJw=; b=Uc5zZKag2u6yLgqQm5iNguz9v2cjO6gtFf/ZdBhHFxdG1ZeanLfbS1dqmCxEnaD/Gv MX6qAxvFOdrz/0ETn6JFC3dUXh7bKBtMkiKW7yuvzm4tXJWa2K7bsfzL8tg3Q5fLueht /WqsQ41OV7VEEbq0odC9ZeMu70acGVII6AoomlnaRX/oCrZb9Gb7qoK3W/OI8cV/85Zg tj5Lv9OiAkeAqvNMs7Fv0VcvyDnWxsIcWHxvEZSt8uA1DspL1lTFDnxGxsw44c45fyKL lnPD7QGjGeH357namUhqPjFiyhPjmLSPweuOXi7wu8M84ksTkGRJ2mxUE+NN+EBl6ptF EiWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=FH5Q2lMD; 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 g22si57372137pfj.222.2018.11.26.03.02.08; Mon, 26 Nov 2018 03:02:28 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b=FH5Q2lMD; 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 S1729580AbeKZVxV (ORCPT + 99 others); Mon, 26 Nov 2018 16:53:21 -0500 Received: from mail.kernel.org ([198.145.29.99]:35064 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728810AbeKZVxU (ORCPT ); Mon, 26 Nov 2018 16:53:20 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EA3BE21104; Mon, 26 Nov 2018 10:59:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1543229975; bh=ElHY2n28KE4mqMwj7KqKd0lqgq8e2FUhNHXbteJhfn4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FH5Q2lMDlyiHsSB+kk4vlLd7PPX09gRQ9aP955hyXg16zmVHx3mEnC7DArRNZKXRw Lz78ws2xEv9iqimBNbTOEuaEIpyFUBGKCUSZOhdKNyc3k0f51zFPZghBEMuq0P5tiM r+pOTs9eeR0I+KW36+Eup0TefVQKj8vDOlPrI3aU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jozsef Kadlecsik , Pablo Neira Ayuso , Sasha Levin Subject: [PATCH 4.14 24/62] netfilter: ipset: Correct rcu_dereference() call in ip_set_put_comment() Date: Mon, 26 Nov 2018 11:51:05 +0100 Message-Id: <20181126105052.792935706@linuxfoundation.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181126105050.592727680@linuxfoundation.org> References: <20181126105050.592727680@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.14-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 17b8b74c0f8dbf9b9e3301f9ca5b65dd1c079951 ] The function is called when rcu_read_lock() is held and not when rcu_read_lock_bh() is held. Signed-off-by: Jozsef Kadlecsik Signed-off-by: Pablo Neira Ayuso Signed-off-by: Sasha Levin --- include/linux/netfilter/ipset/ip_set_comment.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/netfilter/ipset/ip_set_comment.h b/include/linux/netfilter/ipset/ip_set_comment.h index 8e2bab1e8e90..70877f8de7e9 100644 --- a/include/linux/netfilter/ipset/ip_set_comment.h +++ b/include/linux/netfilter/ipset/ip_set_comment.h @@ -43,11 +43,11 @@ ip_set_init_comment(struct ip_set *set, struct ip_set_comment *comment, rcu_assign_pointer(comment->c, c); } -/* Used only when dumping a set, protected by rcu_read_lock_bh() */ +/* Used only when dumping a set, protected by rcu_read_lock() */ static inline int ip_set_put_comment(struct sk_buff *skb, const struct ip_set_comment *comment) { - struct ip_set_comment_rcu *c = rcu_dereference_bh(comment->c); + struct ip_set_comment_rcu *c = rcu_dereference(comment->c); if (!c) return 0; -- 2.17.1