These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / arch / um / kernel / tlb.c
index f1b3eb1..3777b82 100644 (file)
@@ -50,6 +50,13 @@ struct host_vm_change {
           .index       = 0, \
           .force       = force })
 
+static void report_enomem(void)
+{
+       printk(KERN_ERR "UML ran out of memory on the host side! "
+                       "This can happen due to a memory limitation or "
+                       "vm.max_map_count has been reached.\n");
+}
+
 static int do_ops(struct host_vm_change *hvc, int end,
                  int finished)
 {
@@ -81,6 +88,9 @@ static int do_ops(struct host_vm_change *hvc, int end,
                }
        }
 
+       if (ret == -ENOMEM)
+               report_enomem();
+
        return ret;
 }
 
@@ -291,7 +301,7 @@ void fix_range_common(struct mm_struct *mm, unsigned long start_addr,
                /* We are under mmap_sem, release it such that current can terminate */
                up_write(&current->mm->mmap_sem);
                force_sig(SIGKILL, current);
-               do_signal();
+               do_signal(&current->thread.regs);
        }
 }
 
@@ -433,8 +443,12 @@ void flush_tlb_page(struct vm_area_struct *vma, unsigned long address)
        else if (pte_newprot(*pte))
                err = protect(mm_id, address, PAGE_SIZE, prot, 1, &flush);
 
-       if (err)
+       if (err) {
+               if (err == -ENOMEM)
+                       report_enomem();
+
                goto kill;
+       }
 
        *pte = pte_mkuptodate(*pte);