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=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 9C6F6C35640 for ; Fri, 21 Feb 2020 08:30:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7038620679 for ; Fri, 21 Feb 2020 08:30:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582273814; bh=uiFWzuo/y1vx3D80IkrnHuinHjU+Bj+7CiDyhZhphNc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=uhFp8k7aJIG7FjgGs7vyBBNVqhWEcWlO8lYv7/EwNfZK0x1/LQ2gnjQstBLOtb7/p VjUqcag8liLE9tPlMSICsuixXmYSfLypW3z2ZtUAVeL4sarx/0n79uEkvqr40WJPWO hmDtBQ9K127kkC1VhnJ59wgjVfxtEf22ColXZUYY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388577AbgBUIaM (ORCPT ); Fri, 21 Feb 2020 03:30:12 -0500 Received: from mail.kernel.org ([198.145.29.99]:53490 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387523AbgBUIQZ (ORCPT ); Fri, 21 Feb 2020 03:16:25 -0500 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 F38E924689; Fri, 21 Feb 2020 08:16:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582272985; bh=uiFWzuo/y1vx3D80IkrnHuinHjU+Bj+7CiDyhZhphNc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=raWKnFEP+XgfdJr/2ggqbYpv0aDEDbx60tY7qGIxdAwnvVr4GFirqVKCLLG2Glmph muLpd1IeHTqHlLX1500GTX89jfCiW5EN+ihI+QVVKys+addZ5mifURFhj4L4ZmY8AM YPHXDp9g5M6DMSejTB8pdQMZ1PEOK+aehhsRrRBs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vasily Averin , Mike Marshall , Sasha Levin Subject: [PATCH 5.4 336/344] help_next should increase position index Date: Fri, 21 Feb 2020 08:42:15 +0100 Message-Id: <20200221072420.936356526@linuxfoundation.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200221072349.335551332@linuxfoundation.org> References: <20200221072349.335551332@linuxfoundation.org> User-Agent: quilt/0.66 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 From: Vasily Averin [ Upstream commit 9f198a2ac543eaaf47be275531ad5cbd50db3edf ] if seq_file .next fuction does not change position index, read after some lseek can generate unexpected output. https://bugzilla.kernel.org/show_bug.cgi?id=206283 Signed-off-by: Vasily Averin Signed-off-by: Mike Marshall Signed-off-by: Sasha Levin --- fs/orangefs/orangefs-debugfs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/orangefs/orangefs-debugfs.c b/fs/orangefs/orangefs-debugfs.c index 25543a966c486..29eaa45443727 100644 --- a/fs/orangefs/orangefs-debugfs.c +++ b/fs/orangefs/orangefs-debugfs.c @@ -273,6 +273,7 @@ static void *help_start(struct seq_file *m, loff_t *pos) static void *help_next(struct seq_file *m, void *v, loff_t *pos) { + (*pos)++; gossip_debug(GOSSIP_DEBUGFS_DEBUG, "help_next: start\n"); return NULL; -- 2.20.1