Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3936748imm; Mon, 8 Oct 2018 11:59:21 -0700 (PDT) X-Google-Smtp-Source: ACcGV62npAd8S77CHG5MRG4wzr9TA2eWZhOr6qiI1bWhhtgnzae0SjX1/Mhi797Tc2PGR9/f6EpX X-Received: by 2002:a65:4882:: with SMTP id n2-v6mr21343959pgs.225.1539025160983; Mon, 08 Oct 2018 11:59:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539025160; cv=none; d=google.com; s=arc-20160816; b=EKkQQZFpJkj0xL13iVA+oSL+ge7G0sgnThtCdeX8CF81jBrzadpvazyFPyPe8Q3cDg Krlqf2+D9jmB9YLIyuDp6gzr6bD0dtarQw7p2HR65/d6gSabJJ5ogumZMA3cxqyrto56 wZROgHM4MTLXi7MPE2ljYOdwRXyhhK7OMNiQwWAsGf4VZFICFu9Xdn2utJfNbgcuBjT0 UE6H936y/RqQJm39toze8+Ok9ylVTe7z4KdOtNJuOpzITXWk/WP4YvytwbhsnQIc8cHR dKNQUoOxj9c4oXp4ePXcp6sCaMW6P+5PPrqV8zCWviJhszcS5M9nt3qoH1DM153xhDDo QF2Q== 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=EmeQbTTarIV4Qq8n7IO1BojFOJ0meb0mQhwMpf74eCI=; b=EpEMjXaB/zfv2++wjIRud2xoWCLXz273gbwwgBObzpjGoES4q0sXV3mCE//rw8NxUg Aa5uUn/mcW7d/+VixUEzt18ZXpsP2TV2PnvOtMOOrfyoAzY8tDCqmYjQAOyE7YgB097J uieeOZn7LHfJV16eHuZOLPt/uagSn4nAQfxjUacKh/UBZKRmaA1G88K5Ko75HMKiJxxL xTERlfKcz3qvx7x6nWd0ZdLC7RJhse0YbOlYTl9zLKxsJZ8hczY9WOJtTsdM5NqmVRHV OyrSKYoBe5V438X3Y8Gob6mRrDD11jd9mrfJWGVWBZ3sAae6lgIJ7LJLVikTS7zhhal1 ixGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=AQr7PfzE; 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 v129-v6si18047045pgv.504.2018.10.08.11.59.06; Mon, 08 Oct 2018 11:59:20 -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; dkim=pass header.i=@kernel.org header.s=default header.b=AQr7PfzE; 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 S1732408AbeJICE7 (ORCPT + 99 others); Mon, 8 Oct 2018 22:04:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:54952 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732400AbeJICE6 (ORCPT ); Mon, 8 Oct 2018 22:04:58 -0400 Received: from localhost (ip-213-127-77-176.ip.prioritytelecom.net [213.127.77.176]) (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 C73C82087D; Mon, 8 Oct 2018 18:51:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539024710; bh=yWltL2I//sUrtP59yoy/9lNihw+pB2w3Lonu71H0ngw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AQr7PfzErrLkoy/k4WigrTsbIaq7dIdpD44y/H09XqdMBgvWN6zIVrfSolBZoD/ZK sFmL//IXdBMlUGHuZ6Ltu6SBlL7ZyWBht8YwGbBEUncedxQSpTokIF+HpUAOi1z8oe S9crYQRu3Vmc71VI4Mbmd6wwlnjiYZjfL/yy3UGo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sami Farin , Cong Wang , Christoph Hellwig , Pablo Neira Ayuso , Sasha Levin Subject: [PATCH 4.18 129/168] netfilter: xt_hashlimit: use s->file instead of s->private Date: Mon, 8 Oct 2018 20:31:49 +0200 Message-Id: <20181008175624.953245159@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181008175620.043587728@linuxfoundation.org> References: <20181008175620.043587728@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: Cong Wang [ Upstream commit 1286df269f498165061e0cf8092ca212545dbb5a ] After switching to the new procfs API, it is supposed to retrieve the private pointer from PDE_DATA(file_inode(s->file)), s->private is no longer referred. Fixes: 1cd671827290 ("netfilter/x_tables: switch to proc_create_seq_private") Reported-by: Sami Farin Signed-off-by: Cong Wang Acked-by: Christoph Hellwig Tested-by: Sami Farin Signed-off-by: Pablo Neira Ayuso Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- net/netfilter/xt_hashlimit.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) --- a/net/netfilter/xt_hashlimit.c +++ b/net/netfilter/xt_hashlimit.c @@ -1057,7 +1057,7 @@ static struct xt_match hashlimit_mt_reg[ static void *dl_seq_start(struct seq_file *s, loff_t *pos) __acquires(htable->lock) { - struct xt_hashlimit_htable *htable = PDE_DATA(file_inode(s->private)); + struct xt_hashlimit_htable *htable = PDE_DATA(file_inode(s->file)); unsigned int *bucket; spin_lock_bh(&htable->lock); @@ -1074,7 +1074,7 @@ static void *dl_seq_start(struct seq_fil static void *dl_seq_next(struct seq_file *s, void *v, loff_t *pos) { - struct xt_hashlimit_htable *htable = PDE_DATA(file_inode(s->private)); + struct xt_hashlimit_htable *htable = PDE_DATA(file_inode(s->file)); unsigned int *bucket = v; *pos = ++(*bucket); @@ -1088,7 +1088,7 @@ static void *dl_seq_next(struct seq_file static void dl_seq_stop(struct seq_file *s, void *v) __releases(htable->lock) { - struct xt_hashlimit_htable *htable = PDE_DATA(file_inode(s->private)); + struct xt_hashlimit_htable *htable = PDE_DATA(file_inode(s->file)); unsigned int *bucket = v; if (!IS_ERR(bucket)) @@ -1130,7 +1130,7 @@ static void dl_seq_print(struct dsthash_ static int dl_seq_real_show_v2(struct dsthash_ent *ent, u_int8_t family, struct seq_file *s) { - struct xt_hashlimit_htable *ht = PDE_DATA(file_inode(s->private)); + struct xt_hashlimit_htable *ht = PDE_DATA(file_inode(s->file)); spin_lock(&ent->lock); /* recalculate to show accurate numbers */ @@ -1145,7 +1145,7 @@ static int dl_seq_real_show_v2(struct ds static int dl_seq_real_show_v1(struct dsthash_ent *ent, u_int8_t family, struct seq_file *s) { - struct xt_hashlimit_htable *ht = PDE_DATA(file_inode(s->private)); + struct xt_hashlimit_htable *ht = PDE_DATA(file_inode(s->file)); spin_lock(&ent->lock); /* recalculate to show accurate numbers */ @@ -1160,7 +1160,7 @@ static int dl_seq_real_show_v1(struct ds static int dl_seq_real_show(struct dsthash_ent *ent, u_int8_t family, struct seq_file *s) { - struct xt_hashlimit_htable *ht = PDE_DATA(file_inode(s->private)); + struct xt_hashlimit_htable *ht = PDE_DATA(file_inode(s->file)); spin_lock(&ent->lock); /* recalculate to show accurate numbers */ @@ -1174,7 +1174,7 @@ static int dl_seq_real_show(struct dstha static int dl_seq_show_v2(struct seq_file *s, void *v) { - struct xt_hashlimit_htable *htable = PDE_DATA(file_inode(s->private)); + struct xt_hashlimit_htable *htable = PDE_DATA(file_inode(s->file)); unsigned int *bucket = (unsigned int *)v; struct dsthash_ent *ent; @@ -1188,7 +1188,7 @@ static int dl_seq_show_v2(struct seq_fil static int dl_seq_show_v1(struct seq_file *s, void *v) { - struct xt_hashlimit_htable *htable = PDE_DATA(file_inode(s->private)); + struct xt_hashlimit_htable *htable = PDE_DATA(file_inode(s->file)); unsigned int *bucket = v; struct dsthash_ent *ent; @@ -1202,7 +1202,7 @@ static int dl_seq_show_v1(struct seq_fil static int dl_seq_show(struct seq_file *s, void *v) { - struct xt_hashlimit_htable *htable = PDE_DATA(file_inode(s->private)); + struct xt_hashlimit_htable *htable = PDE_DATA(file_inode(s->file)); unsigned int *bucket = v; struct dsthash_ent *ent;