public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Li Zefan <lizf@cn.fujitsu.com>
To: Liu Aleaxander <aleaxander@gmail.com>
Cc: Paul Menage <menage@google.com>,
	linux-kernel@vger.kernel.org, containers@lists.osdl.org
Subject: Re: [PATCH] cgroup: Fixes the un-paired cgroup lock problem
Date: Wed, 04 Nov 2009 13:11:10 +0800	[thread overview]
Message-ID: <4AF10CEE.5020807@cn.fujitsu.com> (raw)
In-Reply-To: <b741c2440911031740m52f8c11dt6e57b549cc6ce465@mail.gmail.com>

Liu Aleaxander wrote:
> From: Liu Aleaxander <Aleaxander@gmail.com>
> Date: Wed, 4 Nov 2009 09:27:06 +0800
> Subject: [PATCH] Fixes the un-paired cgroup lock problem
> 
> In cgroup_lock_live_group, it locks the cgroup by mutex_lock, while in the
> cgroup_tasks_write, it unlock it by cgroup_unlock. Even though they are
> equal, but I do think we should make it pair.
> 
> BTW, should we replace others with cgroup_lock and cgroup_unlock?
> Since we already have a wrapper one and it's meaningful.
> 

Before I read the email body, I thought there is a bug where
there is a lock without unlock or vise versa.

I agree the case here can be called "unpaired", but I'm not
convinced this patch is needed. The code is not buggy or
confusing. So the patch neither fixes a bug nor make the code
more readable.


  reply	other threads:[~2009-11-04  5:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-04  1:40 [PATCH] cgroup: Fixes the un-paired cgroup lock problem Liu Aleaxander
2009-11-04  5:11 ` Li Zefan [this message]
2009-11-04 14:26   ` Bill Davidsen
2009-11-05  8:02     ` Li Zefan
     [not found]       ` <4AF36A53.3080005@tmr.com>
2009-11-06  1:05         ` Matt Helsley
2009-11-06 15:17           ` Bill Davidsen
2009-11-06 15:17       ` Bill Davidsen

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=4AF10CEE.5020807@cn.fujitsu.com \
    --to=lizf@cn.fujitsu.com \
    --cc=aleaxander@gmail.com \
    --cc=containers@lists.osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=menage@google.com \
    /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