lkml.org 
[lkml]   [2010]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [xfrm_user] BUG: sleeping function called from invalid context
From
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Fri, 13 Aug 2010 11:36:58 -0400

> Luca Tettamanti <kronos.it@gmail.com> wrote:
>>
>> xfrm_user_policy takes read_lock(&xfrm_km_lock) before calling
>> xfrm_compile_policy (via km->compile_policy), which in turn calls
>> xfrm_policy_alloc with GFP_KERNEL.
>
> Thanks for discovering this bug, it only took 8 years :)

We stumble over one of these every so often don't we? :)

>
> xfrm: Use GFP_ATOMIC in xfrm_compile_policy
>
> As xfrm_compile_policy runs within a read_lock, we cannot use
> GFP_KERNEL for memory allocations.
>
> Reported-by: Luca Tettamanti <kronos.it@gmail.com>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Applied, thanks Herbert.


\
 
 \ /
  Last update: 2010-08-15 07:41    [W:0.149 / U:0.592 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site