[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CA+55aFwc4HF9E=54xA_z3KB_+Ka9rpMRoHQihGo0fP21JmN0cA@mail.gmail.com>
Date: Sat, 23 Jan 2016 10:51:20 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Konstantin Khlebnikov <koct9i@...il.com>
Cc: Cyrill Gorcunov <gorcunov@...il.com>,
linux-mm <linux-mm@...ck.org>,
Andrew Morton <akpm@...uxfoundation.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Vegard Nossum <vegard.nossum@...cle.com>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Vladimir Davydov <vdavydov@...tuozzo.com>,
Andy Lutomirski <luto@...capital.net>,
Quentin Casasnovas <quentin.casasnovas@...cle.com>,
Kees Cook <keescook@...gle.com>, Willy Tarreau <w@....eu>,
Pavel Emelyanov <xemul@...tuozzo.com>
Subject: Re: [PATCH v2] mm: warn about VmData over RLIMIT_DATA
On Sat, Jan 23, 2016 at 2:00 AM, Konstantin Khlebnikov <koct9i@...il.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
Powered by blists - more mailing lists