linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Michal Hocko <mhocko@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Andrea Arcangeli <aarcange@redhat.com>,
	Yang Shi <yang.s@alibaba-inc.com>,
	Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>,
	netdev <netdev@vger.kernel.org>,
	guro@fb.com, LKML <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	syzkaller-bugs@googlegroups.com, Linux-MM <linux-mm@kvack.org>,
	coreteam@netfilter.org, netfilter-devel@vger.kernel.org,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	David Rientjes <rientjes@google.com>,
	"Kirill A. Shutemov" <kirill@shutemov.name>,
	David Miller <davem@davemloft.net>,
	Dmitry Vyukov <dvyukov@google.com>
Subject: Re: [netfilter-core] kernel panic: Out of memory and no killable processes... (2)
Date: Wed, 7 Feb 2018 18:44:39 +0100	[thread overview]
Message-ID: <20180207174439.esm4djxb4trbotne@salvia> (raw)
In-Reply-To: <20180131081916.GO21609@dhcp22.suse.cz>

Hi,

On Wed, Jan 31, 2018 at 09:19:16AM +0100, Michal Hocko wrote:
[...]
> Yeah, we do not BUG but rather fail instead. See __vmalloc_node_range.
> My excavation tools pointed me to "VM: Rework vmalloc code to support mapping of arbitray pages"
> by Christoph back in 2002. So yes, we can safely remove it finally. Se
> below.
> 
> 
> From 8d52e1d939d101b0dafed6ae5c3c1376183e65bb Mon Sep 17 00:00:00 2001
> From: Michal Hocko <mhocko@suse.com>
> Date: Wed, 31 Jan 2018 09:16:56 +0100
> Subject: [PATCH] net/netfilter/x_tables.c: remove size check
> 
> Back in 2002 vmalloc used to BUG on too large sizes. We are much better
> behaved these days and vmalloc simply returns NULL for those. Remove
> the check as it simply not needed and the comment even misleading.
> 
> Suggested-by: Andrew Morton <akpm@linux-foundation.org>
> Signed-off-by: Michal Hocko <mhocko@suse.com>
> ---
>  net/netfilter/x_tables.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c
> index b55ec5aa51a6..48a6ff620493 100644
> --- a/net/netfilter/x_tables.c
> +++ b/net/netfilter/x_tables.c
> @@ -999,10 +999,6 @@ struct xt_table_info *xt_alloc_table_info(unsigned int size)
>  	if (sz < sizeof(*info))
>  		return NULL;
>  
> -	/* Pedantry: prevent them from hitting BUG() in vmalloc.c --RR */
> -	if ((SMP_ALIGN(size) >> PAGE_SHIFT) + 2 > totalram_pages)
> -		return NULL;
> -
>  	/* __GFP_NORETRY is not fully supported by kvmalloc but it should
>  	 * work reasonably well if sz is too large and bail out rather
>  	 * than shoot all processes down before realizing there is nothing

Patchwork didn't catch this patch for some reason, would you mind to
resend?

Thanks!

--
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:[~2018-02-07 17:44 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-28 17:58 syzbot
2018-01-29  0:20 ` Tetsuo Handa
2018-01-29  7:23   ` [netfilter-core] " Florian Westphal
2018-01-29  8:26     ` Kirill A. Shutemov
2018-01-29 16:57       ` Florian Westphal
2018-01-29 18:24         ` Jan Engelhardt
2018-01-29 18:25         ` Michal Hocko
2018-01-29 18:28         ` Kirill A. Shutemov
2018-01-29 22:35           ` Florian Westphal
2018-01-30  7:52             ` Michal Hocko
2018-01-30  8:11               ` Florian Westphal
2018-01-30  8:28                 ` Kirill A. Shutemov
2018-01-30  9:02                   ` Dmitry Vyukov
2018-01-30  9:57                     ` Michal Hocko
2018-01-30 14:01                       ` Michal Hocko
2018-01-30 14:01                         ` Florian Westphal
2018-01-30 14:39                           ` Michal Hocko
2018-02-02 11:41                             ` Pablo Neira Ayuso
2018-01-30 19:27                         ` Andrew Morton
2018-01-31  8:19                           ` Michal Hocko
2018-02-07 17:44                             ` Pablo Neira Ayuso [this message]
2018-02-07 19:06                               ` Andrew Morton
2018-02-07 19:15                                 ` Pablo Neira Ayuso
2018-01-30  9:51                 ` Michal Hocko
2018-03-23 10:40 ` Tetsuo Handa
2018-03-23 11:23   ` Michal Hocko

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=20180207174439.esm4djxb4trbotne@salvia \
    --to=pablo@netfilter.org \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=coreteam@netfilter.org \
    --cc=davem@davemloft.net \
    --cc=dvyukov@google.com \
    --cc=guro@fb.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=kirill@shutemov.name \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=mingo@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    --cc=rientjes@google.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=yang.s@alibaba-inc.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