Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1943832ybv; Fri, 14 Feb 2020 08:38:13 -0800 (PST) X-Google-Smtp-Source: APXvYqxQwl+fisELRJ9Zbatw13Jje4ce4v8E6QpqDLRFRgMubHadMVrxyI4O5g4r8Ii2Lem3uUd+ X-Received: by 2002:aca:1b11:: with SMTP id b17mr2491794oib.45.1581698292869; Fri, 14 Feb 2020 08:38:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581698292; cv=none; d=google.com; s=arc-20160816; b=hg8/+fQaK4A2Stv1/YCKxONGqeyjo/EjyIEez06ZLsVdSDoNXldlDGchHB/9MTYiI+ jHgC7wYYvj2YM5bc7z9GSjqr3rcKr62sQOptEXrhL4S3VqgUUKyUTjq5HYd/oft2YEHV M6OCbzIia/9I8gS1+CZ7EfdA7fHpjemhqkVZj+ro4FfoCxWzsDsEYjFAtEl+CdwUtcDG eGU9MV68fkUH7YE6pBZ/tv/TmC8DKmA07gGHXCPesBudc3hZN1uQoklFVeu4HjkSkwqT Hczbp1XDzF0PjcmgSR+GRG3yJHLcbNCftVAWiycEM/UYD8Z/2wnI3Mc0qndkFiUnpekQ DFfQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=k7/lGYBkapIn4TVQEEzGx6FRtSIkMTMrLV+Ds1YJ1fk=; b=0XR1jyNVaBE1lmacG7aY4Vrss02wvcCmGfwNz4f5jVWPYWluY0ETfZ7uLfqSka4PhU N1MbjJv3IWKbTFKt3iNhfjAhhXWY9Mw6cYCRd/txkKwznHN1fgJH3JgiwFhfVz5eObnG Pm3k/1RjOax70CWOnAIdqVdd/BujJzKETyThxD2Uhq/f9ttGM5LUXOPyNfVlDPrG5GP4 QCpdNgChHWtTCg4UeQCFF8niV0UYhFoTjtcl6UTWtBKzyF2cEC5Yw5SgnOHtrWT6Ky8K OhN7KqPH56J4nmQ7Mee+8APr79/Q7BP0eIXyEdoWNbAriAXHv2K1MnRlFsvmmjjpS0Yl iOuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="neGE/R5S"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m24si3149677otn.67.2020.02.14.08.38.01; Fri, 14 Feb 2020 08:38:12 -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="neGE/R5S"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2393537AbgBNQg2 (ORCPT + 99 others); Fri, 14 Feb 2020 11:36:28 -0500 Received: from mail.kernel.org ([198.145.29.99]:32810 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405857AbgBNQYT (ORCPT ); Fri, 14 Feb 2020 11:24:19 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 33C0824795; Fri, 14 Feb 2020 16:24:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581697458; bh=03m/YZuxHUtpmwUPg60w1w/fNkSrmXYJ/3/BRkmRcWw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=neGE/R5Sm4/rYVA2Eybu5HZoulgNO0yf099M4eWOuclm+DfahwMNYwEGhnoJ7D4O/ zCM1J1TkTdjy5oqBh4Fd4llFl3i9nKZTie74hiDlUVtMJaXgkdfY8UvMaDsaVeM59b SQTlms/UtMltdK7V7MNf/aNfe0jqfyiu6jg6FH+I= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Vasily Averin , Mike Marshall , Sasha Levin , devel@lists.orangefs.org Subject: [PATCH AUTOSEL 4.9 141/141] help_next should increase position index Date: Fri, 14 Feb 2020 11:21:21 -0500 Message-Id: <20200214162122.19794-141-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200214162122.19794-1-sashal@kernel.org> References: <20200214162122.19794-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore 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 0748a26598fca..7d7df003f9d8d 100644 --- a/fs/orangefs/orangefs-debugfs.c +++ b/fs/orangefs/orangefs-debugfs.c @@ -304,6 +304,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