From: Johannes Weiner <hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org>
To: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Li Zefan <lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>,
cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
James Sedgwick <jsedgwick-b10kYP2dOMg@public.gmane.org>,
kernel-team-b10kYP2dOMg@public.gmane.org
Subject: Re: [PATCH cgroup/for-4.4-fixes] cgroup: fix cftype->file_offset handling
Date: Thu, 5 Nov 2015 00:56:24 -0500 [thread overview]
Message-ID: <20151105055624.GA29116@cmpxchg.org> (raw)
In-Reply-To: <20151105051224.GA4914-piEFEHQLUPpN0TnZuCh8vA@public.gmane.org>
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.
>
> Signed-off-by: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> Reported-by: James Sedgwick <jsedgwick-b10kYP2dOMg@public.gmane.org>
> Fixes: 6f60eade2433 ("cgroup: generalize obtaining the handles of and notifying cgroup files")
Kudos to whoever debugged this.
Acked-by: Johannes Weiner <hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org>
WARNING: multiple messages have this Message-ID (diff)
From: Johannes Weiner <hannes@cmpxchg.org>
To: Tejun Heo <tj@kernel.org>
Cc: Li Zefan <lizefan@huawei.com>,
cgroups@vger.kernel.org, linux-kernel@vger.kernel.org,
James Sedgwick <jsedgwick@fb.com>,
kernel-team@fb.com
Subject: Re: [PATCH cgroup/for-4.4-fixes] cgroup: fix cftype->file_offset handling
Date: Thu, 5 Nov 2015 00:56:24 -0500 [thread overview]
Message-ID: <20151105055624.GA29116@cmpxchg.org> (raw)
In-Reply-To: <20151105051224.GA4914@htj.duckdns.org>
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.
>
> Signed-off-by: Tejun Heo <tj@kernel.org>
> Reported-by: James Sedgwick <jsedgwick@fb.com>
> Fixes: 6f60eade2433 ("cgroup: generalize obtaining the handles of and notifying cgroup files")
Kudos to whoever debugged this.
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
next prev parent reply other threads:[~2015-11-05 5:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-05 5:12 [PATCH cgroup/for-4.4-fixes] cgroup: fix cftype->file_offset handling Tejun Heo
2015-11-05 5:12 ` Tejun Heo
[not found] ` <20151105051224.GA4914-piEFEHQLUPpN0TnZuCh8vA@public.gmane.org>
2015-11-05 5:56 ` Johannes Weiner [this message]
2015-11-05 5:56 ` Johannes Weiner
2015-11-07 7:42 ` Zefan Li
2015-11-07 7:42 ` Zefan Li
2015-11-16 15:59 ` Tejun Heo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151105055624.GA29116@cmpxchg.org \
--to=hannes-druugvl0lcnafugrpc6u6w@public.gmane.org \
--cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=jsedgwick-b10kYP2dOMg@public.gmane.org \
--cc=kernel-team-b10kYP2dOMg@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
--cc=tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.