From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD2C3C3F2CE for ; Tue, 17 Mar 2020 11:03:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 839D320738 for ; Tue, 17 Mar 2020 11:03:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584443015; bh=27sp3JF+1DsO3P0UarlbwTlhuFaECf9l/w11Uzak+ls=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=EQO5gOwO5Xkzd+NEssolkJciz4JP7ZFqXteaepYerBtPoX4Ol6snt9s44Vfwitri7 yT16T+mQoUomHeyu206hJh3jcAsMliBPojJrAxDxUOqqXjElS9nhktIx7C8Tut9uph Sb4QGByHdID8mbXosEqnG7vEZLIKKeFS0jbZOuEc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728140AbgCQLDe (ORCPT ); Tue, 17 Mar 2020 07:03:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:43584 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728138AbgCQLDe (ORCPT ); Tue, 17 Mar 2020 07:03:34 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.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 4156320719; Tue, 17 Mar 2020 11:03:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584443013; bh=27sp3JF+1DsO3P0UarlbwTlhuFaECf9l/w11Uzak+ls=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=B+9KbQLUDIdLbJgkteP2Xwp7a398Y/5kkYXXkGdciy54xBmp7PO/0hVGEQEXW5QGN NmW+boSnC3LPrKepTM8hbVzwAt1KThvaSwhFffDmtqTwzNCeYNj2EVxnIlV6dO3AiU c09bkJord0bXbFmAwhuxCo0Uaj+npSCiokmHTTZY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vasily Averin , Pablo Neira Ayuso Subject: [PATCH 5.4 065/123] netfilter: synproxy: synproxy_cpu_seq_next should increase position index Date: Tue, 17 Mar 2020 11:54:52 +0100 Message-Id: <20200317103314.209953789@linuxfoundation.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200317103307.343627747@linuxfoundation.org> References: <20200317103307.343627747@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Vasily Averin commit bb71f846a0002239f7058c84f1496648ff4a5c20 upstream. If .next function does not change position index, following .show function will repeat output related to current position index. Cc: stable@vger.kernel.org Fixes: 1f4aace60b0e ("fs/seq_file.c: simplify seq_file iteration code ...") Link: https://bugzilla.kernel.org/show_bug.cgi?id=206283 Signed-off-by: Vasily Averin Signed-off-by: Pablo Neira Ayuso Signed-off-by: Greg Kroah-Hartman --- net/netfilter/nf_synproxy_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/netfilter/nf_synproxy_core.c +++ b/net/netfilter/nf_synproxy_core.c @@ -267,7 +267,7 @@ static void *synproxy_cpu_seq_next(struc *pos = cpu + 1; return per_cpu_ptr(snet->stats, cpu); } - + (*pos)++; return NULL; }