Re: [PATCH v2] mm: warn about VmData over RLIMIT_DATA

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jan 23, 2016 at 2:00 AM, Konstantin Khlebnikov <koct9i@xxxxxxxxx> 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@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]