cgroups.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zefan Li <lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
To: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Johannes Weiner <hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org>
Cc: 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: Sat, 7 Nov 2015 15:42:55 +0800	[thread overview]
Message-ID: <563DAB7F.7020407@huawei.com> (raw)
In-Reply-To: <20151105051224.GA4914-piEFEHQLUPpN0TnZuCh8vA@public.gmane.org>

On 2015/11/5 13:12, 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")

Acked-by: Zefan Li <lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>

  parent reply	other threads:[~2015-11-07  7:42 UTC|newest]

Thread overview: 4+ 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
     [not found] ` <20151105051224.GA4914-piEFEHQLUPpN0TnZuCh8vA@public.gmane.org>
2015-11-05  5:56   ` Johannes Weiner
2015-11-07  7:42   ` Zefan Li [this message]
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=563DAB7F.7020407@huawei.com \
    --to=lizefan-hv44wf8li93qt0dzr+alfa@public.gmane.org \
    --cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org \
    --cc=jsedgwick-b10kYP2dOMg@public.gmane.org \
    --cc=kernel-team-b10kYP2dOMg@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).