]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mm/mmu_notifier: init notifier if necessary
authorGavin Shan <shangw@linux.vnet.ibm.com>
Fri, 28 Sep 2012 00:19:14 +0000 (10:19 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 8 Oct 2012 02:59:56 +0000 (13:59 +1100)
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;