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=-2.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no 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 29CA3C433FF for ; Thu, 8 Aug 2019 06:42:43 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id ED9A421880 for ; Thu, 8 Aug 2019 06:42:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="kZ91F104"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="TEEQWuy6" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ED9A421880 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=lJ2z9U0drJPkL5MHFrz/varcfI+IEiMN66HWMzxZ9eQ=; b=kZ91F1040vPiG9 pRBqp7fESU+oEpiYzL4KqCYpwh3egm5drBwkZvun0qkSTu7UZHfK6xkPqgCxTkYdRJP5942cY7h/x yUt4t6Zom9IRJV1v4EoB1Hop7polRDfMpatftNLG6AYE/wJ2QVwHqxk69Vho7T0zOU04pfXdU5pmX e+ljsN6sTuJzPKuQTlREf75jiC6UGKGwWswDk5x8Z/7ekuo5iOlrKoqKHSPqrO7Nmj84fHQGP2RBy w2AiF9jIhdjO5u0JwJgRnCGE0a5w00IfSwRq0ghUWvq5Yy1r7/OcwyEU4Q/ljDcxgk7fyBUeUHUAx eJc8QzAWrcmB3XVHcEdA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hvc8I-0007qg-DO; Thu, 08 Aug 2019 06:42:42 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hvc8E-0007pj-SL for linux-arm-kernel@lists.infradead.org; Thu, 08 Aug 2019 06:42:40 +0000 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 EF2DD20880; Thu, 8 Aug 2019 06:42:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565246557; bh=QkRNK9YOfVlVjw60w9/iF0cccnbeZTBNkhlnMmoHZSo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TEEQWuy6TSpOEZMwvSr5bheEo6c0goUwfwhY6u81BONopHxyVvbgi4ZhzicU1UCZU QXbtoqaRmyPdA18atxTjX/YtfT5T8mPLvFzvbzRdeu4qtSO+eZw4b0Gf4W97UvfZSm L8jVUt4qJ/cpM3lWvFw3sZyg80FMbtaTWDY/b8Qo= Date: Thu, 8 Aug 2019 08:42:35 +0200 From: Greg Kroah-Hartman To: Tejun Heo Subject: Re: [PATCH] kernfs: fix memleak in kernel_ops_readdir() Message-ID: <20190808064235.GC26197@kroah.com> References: <20190805173404.GF136335@devbig004.ftw2.facebook.com> <20190807132928.GD5443@atomide.com> <20190807184518.GP136335@devbig004.ftw2.facebook.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190807184518.GP136335@devbig004.ftw2.facebook.com> User-Agent: Mutt/1.12.1 (2019-06-15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190807_234238_950254_A83EE394 X-CRM114-Status: GOOD ( 14.03 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrea Arcangeli , Tony Lindgren , linux-kernel@vger.kernel.org, Russell King , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Aug 07, 2019 at 11:45:18AM -0700, Tejun Heo wrote: > Hello, > > On Wed, Aug 07, 2019 at 06:29:28AM -0700, Tony Lindgren wrote: > > Hi, > > > > * Tejun Heo [691231 23:00]: > > > From: Andrea Arcangeli > > > > > > If getdents64 is killed or hits on segfault, it'll leave cgroups > > > directories in sysfs pinned leaking memory because the kernfs node > > > won't be freed on rmdir and the parent neither. > > > > Somehow this causes a regression in Linux next for me where I'm seeing > > lots of sysfs entries now missing under /sys/bus/platform/devices. > > > > For example, I now only see one .serial entry show up in sysfs. > > Things work again if I revert commit cc798c83898e ("kernfs: fix memleak > > inkernel_ops_readdir()"). Any ideas why that would be? > > > > Below is a diff -u of ls /sys/bus/platform/devices for reference > > showing the missing entries with cc798c83898e. > > Ugh, you're right. It can get double-put cuz ctx->pos is put by > release too. Greg, sorry about the noise but can you please revert > the patch? I'll look into why this looked like memory leak from > slabinfo side. Now reverted, thanks. greg k-h _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel