Re: [CHECKER] potential deadlocks

Nikita Danilov (Nikita@Namesys.COM)
Fri, 7 Mar 2003 14:24:17 +0300

Dawson Engler writes:
> > Andrew Morton writes:


Sorry for delay.

> Do you mean calls to copy_*_user and kmalloc(GFP_WAIT) or did you have
> something else in mind as well?

Yes. Imagine thread that tries to allocate memory with __GFP_FS while
keeping some file system locks. Now try_to_free_pages() calls
->writepage() method that tries to acquire the same lock. See, for
examples, comment before fs/ext3/inode.c:ext3_writepage(), or in

> > We have (incomplete) description of kernel lock ordering, which is
> > centered around reiser4 locks, but also includes some core kernel stuff.
> >
> > It is available at
> >
> > --- source for Bell-Labs' dot(1)
> > --- postscript output, produced from the .dot source
> Wonderful; thanks!

I would be glad to receive additions and corrections for this diagram.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at