mm-commits.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* + mm-always-print-rlimit_data-warning.patch added to -mm tree
@ 2018-02-08 22:30 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2018-02-08 22:30 UTC (permalink / raw)
  To: dwmw, gorcunov, koct9i, vdavydov, xemul, mm-commits


The patch titled
     Subject: mm: always print RLIMIT_DATA warning
has been added to the -mm tree.  Its filename is
     mm-always-print-rlimit_data-warning.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/mm-always-print-rlimit_data-warning.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/mm-always-print-rlimit_data-warning.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: David Woodhouse <dwmw@amazon.co.uk>
Subject: mm: always print RLIMIT_DATA warning

The documentation for ignore_rlimit_data says that it will print a warning
at first misuse.  Yet it doesn't seem to do that.  Fix the code to print
the warning even when we allow the process to continue.

Link: http://lkml.kernel.org/r/1517935505-9321-1-git-send-email-dwmw@amazon.co.uk
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Acked-by: Konstantin Khlebnikov <koct9i@gmail.com>
Cc: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Vladimir Davydov <vdavydov@virtuozzo.com>
Cc: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/mmap.c |   14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff -puN mm/mmap.c~mm-always-print-rlimit_data-warning mm/mmap.c
--- a/mm/mmap.c~mm-always-print-rlimit_data-warning
+++ a/mm/mmap.c
@@ -3184,13 +3184,15 @@ bool may_expand_vm(struct mm_struct *mm,
 		if (rlimit(RLIMIT_DATA) == 0 &&
 		    mm->data_vm + npages <= rlimit_max(RLIMIT_DATA) >> PAGE_SHIFT)
 			return true;
-		if (!ignore_rlimit_data) {
-			pr_warn_once("%s (%d): VmData %lu exceed data ulimit %lu. Update limits or use boot option ignore_rlimit_data.\n",
-				     current->comm, current->pid,
-				     (mm->data_vm + npages) << PAGE_SHIFT,
-				     rlimit(RLIMIT_DATA));
+
+		pr_warn_once("%s (%d): VmData %lu exceed data ulimit %lu. Update limits%s.\n",
+			     current->comm, current->pid,
+			     (mm->data_vm + npages) << PAGE_SHIFT,
+			     rlimit(RLIMIT_DATA),
+			     ignore_rlimit_data ? "" : " or use boot option ignore_rlimit_data");
+
+		if (!ignore_rlimit_data)
 			return false;
-		}
 	}
 
 	return true;
_

Patches currently in -mm which might be from dwmw@amazon.co.uk are

mm-always-print-rlimit_data-warning.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-02-08 22:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-08 22:30 + mm-always-print-rlimit_data-warning.patch added to -mm tree akpm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).