Merge tag 'mm-stable-2024-03-13-20-04' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-microblaze.git] / mm / util.c
index 5faf3ad..6693972 100644 (file)
--- a/mm/util.c
+++ b/mm/util.c
@@ -959,6 +959,7 @@ EXPORT_SYMBOL_GPL(vm_memory_committed);
 int __vm_enough_memory(struct mm_struct *mm, long pages, int cap_sys_admin)
 {
        long allowed;
+       unsigned long bytes_failed;
 
        vm_acct_memory(pages);
 
@@ -993,8 +994,9 @@ int __vm_enough_memory(struct mm_struct *mm, long pages, int cap_sys_admin)
        if (percpu_counter_read_positive(&vm_committed_as) < allowed)
                return 0;
 error:
-       pr_warn_ratelimited("%s: pid: %d, comm: %s, not enough memory for the allocation\n",
-                           __func__, current->pid, current->comm);
+       bytes_failed = pages << PAGE_SHIFT;
+       pr_warn_ratelimited("%s: pid: %d, comm: %s, bytes: %lu not enough memory for the allocation\n",
+                           __func__, current->pid, current->comm, bytes_failed);
        vm_unacct_memory(pages);
 
        return -ENOMEM;