Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5610489imu; Mon, 26 Nov 2018 02:59:19 -0800 (PST) X-Google-Smtp-Source: AFSGD/UoE1ISQNhH2kEZMqJXoktiWYGjUAJm/KL29xPJVZo9G9di5Pls0yToTao9Mp13dKZYZt1Q X-Received: by 2002:a17:902:1681:: with SMTP id h1mr27327109plh.129.1543229959348; Mon, 26 Nov 2018 02:59:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543229959; cv=none; d=google.com; s=arc-20160816; b=Ss6NrfbEwxlHSJidGVclg5BbaAsLvx3+tUSPh36TQ+Cr8SpnyadKXXatS53dKYLGbh fduR9DyupD0eFVdrNf1XUP6h6MJQQyhM0WPbaemHrp+F139EPtjVl9nrO/4URDkLPgL1 d//Z7PjrxNlLPlXW8HW1sCCfBNhL4vI1TajFYAqodAAxcE9yxt1CPaZIcSeTENIooJdt XTnZPdG0QjGyLen2e9YCBF9tnBzfaHQBx+SvL0luuS00qtem7JgP2hXh17GtHq3tPVF5 gElfps1GXrNjgG6vaIXslBU2ZrSX6xeI/Btlek5EwB2CxG60J78yFVfAlfebNW4xdoep 5tJQ== 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=f8syD329/ie90+t3LZHufYp8aLA3UAho0TEsXunZaDE=; b=0UZtnCWrbmxmC1HBXV9UdlQ41fLtDKmtwWawsKKrxfPQielFXqdraDikriofMbGIen NHuVV1d0Kax5UiKV9GxHzQKEgpXD8fC3F5VQEkkkhyZgl30r8THkYqVOfLFkjDBSZhsX vE2AqMdiMXK+orLYa/QLQYRV+r9G8gAfN9EkYMauo/7Iw44UWLtYCZqG8YQxh1WEzsiz B5Bvs09Aeu0FJV1jBpIyF2IXY7lKyQkXTW7qYncbnOfmpomGwrsTkrhy0O4cmBw/wdRx FL3b/WGIXhGJCWuoH8o96nFZ7EaJLklDdBOALHPCltMwb/TzHpsrRAUTIM/A3RvisMre hxEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=E7rMHkPF; 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 s192si64828547pgc.144.2018.11.26.02.59.04; Mon, 26 Nov 2018 02:59:19 -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=E7rMHkPF; 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 S1728415AbeKZVuN (ORCPT + 99 others); Mon, 26 Nov 2018 16:50:13 -0500 Received: from mail.kernel.org ([198.145.29.99]:59362 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726532AbeKZVuN (ORCPT ); Mon, 26 Nov 2018 16:50:13 -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 20D1E20817; Mon, 26 Nov 2018 10:56:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1543229788; bh=RDeOrIntqDWr91uIg2HXUXdBo6qUPR70pbHQnKybPrw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E7rMHkPFoEcythxW+0f503I0iXISqEW7yoj2fEKL83M4xxJ6OALIq7//OmMTVygRG PCkgHonLvmGdyCI3CduaO09i/YQJitFBk56awYVh42EOvWqXVjCT7mK9loQjr7pyar +I7pbrgjCp8NtjJpdMiC8hyJugkTKFUFqkuD6nLI= 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.4 49/70] netfilter: ipset: Correct rcu_dereference() call in ip_set_put_comment() Date: Mon, 26 Nov 2018 11:51:04 +0100 Message-Id: <20181126105051.695392980@linuxfoundation.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181126105046.722096341@linuxfoundation.org> References: <20181126105046.722096341@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.4-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 8d0248525957..9f34204978e4 100644 --- a/include/linux/netfilter/ipset/ip_set_comment.h +++ b/include/linux/netfilter/ipset/ip_set_comment.h @@ -41,11 +41,11 @@ ip_set_init_comment(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, 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