linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Konstantin Khlebnikov <koct9i@gmail.com>
Cc: Cyrill Gorcunov <gorcunov@gmail.com>,
	linux-mm <linux-mm@kvack.org>,
	Andrew Morton <akpm@linuxfoundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Vegard Nossum <vegard.nossum@oracle.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Vladimir Davydov <vdavydov@virtuozzo.com>,
	Andy Lutomirski <luto@amacapital.net>,
	Quentin Casasnovas <quentin.casasnovas@oracle.com>,
	Kees Cook <keescook@google.com>, Willy Tarreau <w@1wt.eu>,
	Pavel Emelyanov <xemul@virtuozzo.com>
Subject: Re: [PATCH v2] mm: warn about VmData over RLIMIT_DATA
Date: Sat, 23 Jan 2016 10:51:20 -0800	[thread overview]
Message-ID: <CA+55aFwc4HF9E=54xA_z3KB_+Ka9rpMRoHQihGo0fP21JmN0cA@mail.gmail.com> (raw)
In-Reply-To: <145354323486.16567.6251495688050187292.stgit@zurg>

On Sat, Jan 23, 2016 at 2:00 AM, Konstantin Khlebnikov <koct9i@gmail.com> wrote:
> +       if ((flags & (VM_WRITE | VM_SHARED |
> +               (VM_STACK_FLAGS & (VM_GROWSUP | VM_GROWSDOWN)))) == VM_WRITE &&
> +           mm->data_vm + npages > rlimit(RLIMIT_DATA) >> PAGE_SHIFT &&
> +           !WARN_ONCE(ignore_rlimit_data, "VmData %lu exceeds RLIMIT_DATA %lu",
> +                      (mm->data_vm + npages)<<PAGE_SHIFT, rlimit(RLIMIT_DATA)))
> +               return false;

This needs to be rewritten as an inline helper function or made
readable some other way.

It looks like line noise (or perl). That kind of code should not exist.

                  Linus

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      reply	other threads:[~2016-01-23 18:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-23 10:00 Konstantin Khlebnikov
2016-01-23 18:51 ` Linus Torvalds [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CA+55aFwc4HF9E=54xA_z3KB_+Ka9rpMRoHQihGo0fP21JmN0cA@mail.gmail.com' \
    --to=torvalds@linux-foundation.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linuxfoundation.org \
    --cc=gorcunov@gmail.com \
    --cc=keescook@google.com \
    --cc=koct9i@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=luto@amacapital.net \
    --cc=quentin.casasnovas@oracle.com \
    --cc=vdavydov@virtuozzo.com \
    --cc=vegard.nossum@oracle.com \
    --cc=w@1wt.eu \
    --cc=xemul@virtuozzo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox