cgroups.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Li Zefan <lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
To: Sasha Levin <sasha.levin-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Cc: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] cgroup: missing rcu read lock around task_css_set
Date: Fri, 28 Mar 2014 10:48:17 +0800	[thread overview]
Message-ID: <5334E2F1.3040809@huawei.com> (raw)
In-Reply-To: <5334452D.4080200-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>

On 2014/3/27 23:35, Sasha Levin wrote:
> On 03/04/2014 07:57 PM, Li Zefan wrote:
>> On 2014/3/5 3:47, Tejun Heo wrote:
>>> On Tue, Mar 04, 2014 at 12:20:45PM -0500, Sasha Levin wrote:
>>>>> Hrm... there is a PF_EXITING check there already:
>>>>>
>>>>>      #define task_css_set_check(task, __c)            \
>>>>>          rcu_dereference_check((task)->cgroups,        \
>>>>>          lockdep_is_held(&cgroup_mutex) ||        \
>>>>>          lockdep_is_held(&css_set_rwsem) ||        \
>>>>>          ((task)->flags & PF_EXITING) || (__c))
>>>>>
>>>>> I see it's not happening on Linus's master so I'll run a bisection to figure out what broke it.
>>>>
>>>> Hi Tejun,
>>>>
>>>> It bisects down to your patch: "cgroup: drop task_lock() protection
>>>> around task->cgroups". I'll look into it later unless it's obvious
>>>> to you.
>>>
>>> Hmmm... maybe I'm confused and PF_EXITING is not set there and
>>> task_lock was what held off the lockdep warning.  Confused....
>>>
>>
>> Because this cgroup_exit() is called in a failure path in copy_process().
> 
> It seems there was no conclusion here and it still happens in -next, anything
> we can do about it?
> 

I'll send a patch to fix it. Thanks!

      parent reply	other threads:[~2014-03-28  2:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-02  3:00 [PATCH] cgroup: missing rcu read lock around task_css_set Sasha Levin
     [not found] ` <1393729211-937-1-git-send-email-sasha.levin-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2014-03-03 22:33   ` Tejun Heo
     [not found]     ` <20140303223327.GB26523-9pTldWuhBndy/B6EtB590w@public.gmane.org>
2014-03-03 22:43       ` Sasha Levin
     [not found]         ` <5315057F.3030602-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2014-03-03 22:45           ` Tejun Heo
2014-03-03 22:48             ` Sasha Levin
     [not found]             ` <20140303224505.GE26523-9pTldWuhBndy/B6EtB590w@public.gmane.org>
2014-03-03 23:00               ` Sasha Levin
     [not found]                 ` <53150989.70307-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2014-03-04 17:20                   ` Sasha Levin
     [not found]                     ` <53160B6D.8020501-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2014-03-04 19:47                       ` Tejun Heo
     [not found]                         ` <20140304194741.GA2204-Gd/HAXX7CRxy/B6EtB590w@public.gmane.org>
2014-03-05  0:57                           ` Li Zefan
     [not found]                             ` <53167662.5000801-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2014-03-27 15:35                               ` Sasha Levin
     [not found]                                 ` <5334452D.4080200-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2014-03-28  2:48                                   ` 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=5334E2F1.3040809@huawei.com \
    --to=lizefan-hv44wf8li93qt0dzr+alfa@public.gmane.org \
    --cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=sasha.levin-QHcLZuEGTsvQT0dZR+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 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).