From: Dima Zavin Date: Tue, 26 Oct 2010 21:21:54 +0000 (-0700) Subject: mm: add a might_sleep_if() to dma_pool_alloc() X-Git-Tag: v2.6.37-rc1~105^2~128 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea05c8444e451f1cfbf78c68733e717ad7b8602b;p=pandora-kernel.git mm: add a might_sleep_if() to dma_pool_alloc() Buggy drivers (e.g. fsl_udc) could call dma_pool_alloc from atomic context with GFP_KERNEL. In most instances, the first pool_alloc_page call would succeed and the sleeping functions would never be called. This allowed the buggy drivers to slip through the cracks. Add a might_sleep_if() checking for __GFP_WAIT in flags. Signed-off-by: Dima Zavin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed