Re: lockdep trace from prepare_bprm_creds

From: Tejun Heo
Date: Thu Mar 07 2013 - 14:33:51 EST


On Thu, Mar 07, 2013 at 07:32:14PM +0100, Oleg Nesterov wrote:
> On 03/07, Tejun Heo wrote:
> >
> > On Thu, Mar 07, 2013 at 10:01:39AM -0800, Tejun Heo wrote:
> > >
> > > Another possibility is moving cgroup_lock outside threadgroup_lock(),
> > > which was impossible before because of cgroup_lock abuses in specific
> > > controller implementations but most of that have been updated and we
> > > should now be pretty close to being able to make cgroup_lock outer to
> > > most other locks. Appending a completely untested patch below.
> >
> > This probably doesn't help as the dependency involves i_mutex.
>
> Confused... why?

Maybe I'm confused. We still have i_mutex -> cgroup_lock from the
mount path. The original deadlock was cred_mutex -> i_mutex
vs. i_mutex -> cgroup_mutex -> cred_mutex. The patch changes the
latter to i_mutex -> cgroup_mutex and cred_mutex -> cgroup_mutex.
Gosh, it's confusing, yeah, we might be okay.

--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/