Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1594642pxb; Thu, 4 Feb 2021 18:00:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJyK53Et1pTWp6DhyHotF0DEWSgnnoZRscriAy2XfyBwrzlvgb+B/3+fKYbbJbETwyghghCY X-Received: by 2002:a17:907:94c8:: with SMTP id dn8mr1883276ejc.512.1612490431566; Thu, 04 Feb 2021 18:00:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612490431; cv=none; d=google.com; s=arc-20160816; b=lcgym3h5NovPP1nuaYTGIKs/yMtVtD3+UNtbmRSX03l1AXsnR+QPetPBr0tJAZC+SC aCDy1QDvgvLmm/IbTqRbhI0uTAxlH5+YNoR/KnwBr2kaSHNLYgTgZpzcmHSvsCtxaOP9 pSm4qfnjUHvIel+X7uvq4zD1ChO9mt9VD8y29iI8JGm6vR66qHtpR0vfKSu8CZa38pVf AQeN7bXXQMKsClXSJLVSmMsBIGUol9MOIgcUsQOsAZGXSFKc5ZppQri8TWFd+Oyxp1hU MUxu2L+qmWLEWxGvEid6r6tY4V7xuTCI7JIzBMyOn3Id4cocT/aB/SdhOId7m452kql/ Fp0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:message-id:cc:subject:date:to:from; bh=2BKolVYRA24L5M1dR5IjgIlwgF6huopYnSMDBKUSxMA=; b=zH2S0bVnH3/cBNHR1zJgO7t31W6zd6RUIXlkv4y0FV/nRWE4N8n7ie/3nPJb8djyAQ AYYNDaO0sr+Am9odrzavnmuNepxo5zqu4bK1K/uK1HXYiGmLCMngV3YF1Po6iqSuFG3/ uKcdeXi6rLDFe2zimAqCWrbLmcomAtjfMYbCc2QOXnLgpUdOT84MGU+kS/3qHaGefrKh o3Q256WOgmxe8PVAQ15zdiFO/G2XCpUy3XaBEfLx2va/AM8RMmpGrhgdbdtx8BKSekOb vLFGY4i8c2A9IVwBSzVa2pACcY4CLkH4zy+5lW4hr6t49UlAN1HrjQ/gWOSJyaOfQ9ru X02g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r23si4977824edy.455.2021.02.04.18.00.07; Thu, 04 Feb 2021 18:00:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232146AbhBEAr0 (ORCPT + 99 others); Thu, 4 Feb 2021 19:47:26 -0500 Received: from mx2.suse.de ([195.135.220.15]:37936 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232132AbhBEArZ (ORCPT ); Thu, 4 Feb 2021 19:47:25 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 376E8B06A; Fri, 5 Feb 2021 00:46:43 +0000 (UTC) From: NeilBrown To: Andrew Morton , Alexander Viro , Jonathan Corbet Date: Fri, 05 Feb 2021 11:36:30 +1100 Subject: [PATCH 0/3] Fix some seq_file users that were recently broken Cc: Xin Long , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Ingo Molnar , Dave Hansen , Andy Lutomirski , Peter Zijlstra , Vlad Yasevich , Neil Horman , Marcelo Ricardo Leitner , "David S. Miller" , linux-sctp@vger.kernel.org, netdev@vger.kernel.org Message-ID: <161248518659.21478.2484341937387294998.stgit@noble1> User-Agent: StGit/0.23 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A recent change to seq_file broke some users which were using seq_file in a non-"standard" way ... though the "standard" isn't documented, so they can be excused. The result is a possible leak - of memory in one case, of references to a 'transport' in the other. These three patches: 1/ document and explain the problem 2/ fix the problem user in x86 3/ fix the problem user in net/sctp I suspect the patches should each go through the relevant subsystems, but I'm including akpm as the original went through him. Thanks, NeilBrown --- NeilBrown (3): seq_file: document how per-entry resources are managed. x86: fix seq_file iteration for pat/memtype.c net: fix iteration for sctp transport seq_files Documentation/filesystems/seq_file.rst | 6 ++++++ arch/x86/mm/pat/memtype.c | 4 ++-- net/sctp/proc.c | 16 ++++++++++++---- 3 files changed, 20 insertions(+), 6 deletions(-) -- Signature