Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752788AbbKPP7R (ORCPT ); Mon, 16 Nov 2015 10:59:17 -0500 Received: from mail-yk0-f170.google.com ([209.85.160.170]:35140 "EHLO mail-yk0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752411AbbKPP7O (ORCPT ); Mon, 16 Nov 2015 10:59:14 -0500 Date: Mon, 16 Nov 2015 10:59:11 -0500 From: Tejun Heo To: Li Zefan , Johannes Weiner Cc: cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, James Sedgwick , kernel-team@fb.com Subject: Re: [PATCH cgroup/for-4.4-fixes] cgroup: fix cftype->file_offset handling Message-ID: <20151116155911.GD18894@mtj.duckdns.org> References: <20151105051224.GA4914@htj.duckdns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151105051224.GA4914@htj.duckdns.org> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1292 Lines: 28 On Thu, Nov 05, 2015 at 12:12:24AM -0500, Tejun Heo wrote: > 6f60eade2433 ("cgroup: generalize obtaining the handles of and > notifying cgroup files") introduced cftype->file_offset so that the > handles for per-css file instances can be recorded. These handles > then can be used, for example, to generate file modified > notifications. > > Unfortunately, it made the wrong assumption that files are created > once for a given css and removed on its destruction. Due to the > dependencies among subsystems, a css may be hidden from userland and > then later shown again. This is implemented by removing and > re-creating the affected files, so the associated kernfs_node for a > given cgroup file may change over time. This incorrect assumption led > to the corruption of css->files lists. > > Reimplement cftype->file_offset handling so that cgroup_file->kn is > protected by a lock and updated as files are created and destroyed. > This also makes keeping them on per-cgroup list unnecessary. Applied to cgroup/for-4.4-fixes. -- tejun -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/