All of lore.kernel.org
 help / color / mirror / Atom feed
From: Li Zefan <lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
To: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
Subject: Re: [PATCH for-3.13-fixes] cgroup: fix cgroup_subsys_state leak for seq_files
Date: Thu, 28 Nov 2013 17:06:33 +0800	[thread overview]
Message-ID: <52970799.8060603@huawei.com> (raw)
In-Reply-To: <20131127231550.GE13098-9pTldWuhBndy/B6EtB590w@public.gmane.org>

On 2013/11/28 7:15, Tejun Heo wrote:
> If a cgroup file implements either read_map() or read_seq_string(),
> such file is served using seq_file by overriding file->f_op to
> cgroup_seqfile_operations, which also overrides the release method to
> single_release() from cgroup_file_release().
> 
> Because cgroup_file_open() didn't use to acquire any resources, this
> used to be fine, but since f7d58818ba42 ("cgroup: pin
> cgroup_subsys_state when opening a cgroupfs file"), cgroup_file_open()
> pins the css (cgroup_subsys_state) which is put by
> cgroup_file_release().  The patch forgot to update the release path
> for seq_files and each open/release cycle leaks a css reference.
> 
> Fix it by updating cgroup_file_release() to also handle seq_files and
> using it for seq_file release path too.
> 
> Signed-off-by: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> Cc: stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org # v3.12
> ---
> Hello,
> 
> I'm applying this to for-3.13-fixes right away so that I can push it
> out to Linus tomorrow along with other fixes.
> 

That's fine.

bwt, I'll finish reviewing the cgroup pidlist patchset tomorrow.

      parent reply	other threads:[~2013-11-28  9:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-27 23:15 [PATCH for-3.13-fixes] cgroup: fix cgroup_subsys_state leak for seq_files Tejun Heo
     [not found] ` <20131127231550.GE13098-9pTldWuhBndy/B6EtB590w@public.gmane.org>
2013-11-28  9:06   ` Li Zefan [this message]

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=52970799.8060603@huawei.com \
    --to=lizefan-hv44wf8li93qt0dzr+alfa@public.gmane.org \
    --cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@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.