Re: [ckrm-tech] Circular Locking Dependency Chain detected incontainers code

From: Peter Zijlstra
Date: Tue Aug 07 2007 - 16:24:12 EST


On Tue, 2007-08-07 at 13:10 -0700, Paul Menage wrote:
> I'm away from work at the moment and can't investigate fully, but it
> looks as though this may be the same one that I mentioned in the
> introductory email to the patchset. If so, it's a false positive -
> there's a point in the container mount code where we need to lock a
> newly-created (and hence guaranteed unlocked) directory inode while
> holding container mutex. This makes the lockdep code think that
> inode->i_mutex nests inside container_mutex, when in fact
> container_mutex nests outside inode->i_mutex in all cases except this
> one case where i_mutex can't possibly be locked.
>
> I've not learned enough about lockdep yet to figure out how to shut it
> up in this case.

The typical annotation would be using spin_lock_nested/mutex_lock_nested
with a non-0 nesting level for this one case.

-
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/