]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mm/mmu_notifier: init notifier if necessary
authorGavin Shan <shangw@linux.vnet.ibm.com>
Thu, 13 Sep 2012 00:58:36 +0000 (10:58 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 18 Sep 2012 06:04:17 +0000 (16:04 +1000)
v2: Use GFP_KERNEL instead of GFP_ATOMIC when allocating the MMU
    notifier_mm as Andrew suggested.

Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/mmu_notifier.c

index 4bdeeb963a48d449f492c21db9816eda732432fa..947df83dccb06d7841bae8d941a9fa6fcdc21dc6 100644 (file)
@@ -215,7 +215,7 @@ static int do_mmu_notifier_register(struct mmu_notifier *mn,
 
        if (!mm_has_notifiers(mm)) {
                mmu_notifier_mm = kmalloc(sizeof(struct mmu_notifier_mm),
-                                       GFP_ATOMIC);
+                                       GFP_KERNEL);
                if (unlikely(!mmu_notifier_mm)) {
                        ret = -ENOMEM;
                        goto out_of_mem;