mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-07 04:09:21 +00:00
reserve_region_with_split: Fix GFP_KERNEL usage under spinlock
This one apparently doesn't generate any warnings, because the function is only used during system bootup, when the warnings are disabled. But it's still very wrong. The __reserve_region_with_split() function is called with the resource_lock held for writing, so it must only ever do GFP_ATOMIC allocations. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
cdce1f0931
commit
42c0202363
1 changed files with 1 additions and 1 deletions
|
@ -523,7 +523,7 @@ static void __init __reserve_region_with_split(struct resource *root,
|
|||
{
|
||||
struct resource *parent = root;
|
||||
struct resource *conflict;
|
||||
struct resource *res = kzalloc(sizeof(*res), GFP_KERNEL);
|
||||
struct resource *res = kzalloc(sizeof(*res), GFP_ATOMIC);
|
||||
|
||||
if (!res)
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue