netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
To: Nikolay Borisov <kernel@kyup.com>, kadlec@blackhole.kfki.hu
Cc: pablo@netfilter.org, davem@davemloft.net,
	netfilter-devel@vger.kernel.org, netdev@vger.kernel.org,
	operations@siteground.com
Subject: Re: [PATCH] Fix sleeping memory allocation in atomic context
Date: Thu, 15 Oct 2015 12:13:36 +0200	[thread overview]
Message-ID: <561F7C50.6080401@cumulusnetworks.com> (raw)
In-Reply-To: <1444899472-8191-1-git-send-email-kernel@kyup.com>

On 10/15/2015 10:57 AM, Nikolay Borisov wrote:
> Ipset 6.26 produces the following splat:
> 
[snip]
> 
> The call chain leading to this as follow:
> call_add -> list_set_uadt -> list_set_uadd -> kzalloc(, GFP_KERNEL).
> And since GFP_KERNEL allows initiating direct reclaim thus
> potentially sleeping in the allocation path, this leads to the
> aforementioned splat.
> 
> To fix it change that particular allocation type to GFP_ATOMIC, to
> correctly reflect that it is happening in an atomic context.
> 
> Signed-off-by: Nikolay Borisov <kernel@kyup.com>
> ---
> 
> Even though this patch has been generated against the stand-alone
> ipset sources I just checked the 4.3-rc4 sources and the problem
> exists there as well.
> 
>  kernel/net/netfilter/ipset/ip_set_list_set.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/net/netfilter/ipset/ip_set_list_set.c b/kernel/net/netfilter/ipset/ip_set_list_set.c
> index b11ba96..0f9195f 100644

Hi,
You should fix your subject line to include the subsystem [1], something like
netfilter: ipset: fix...
The path to the file being patched is incorrect, patches should be generated in
the root kernel source dir [2].
Also it'd be nice to add a Fixes tag [3] to show which commit introduced the bug,
in this case it looks like it's:
Fixes: 00590fdd5be0 ("netfilter: ipset: Introduce RCU locking in list type")

Cheers,
 Nik

[1] Documentation/SubmittingPatches chapter 14
[2] Documentation/SubmittingPatches chapter 1
[3] Documentation/SubmittingPatches chapters 2 and 13


  reply	other threads:[~2015-10-15 10:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-15  8:57 [PATCH] Fix sleeping memory allocation in atomic context Nikolay Borisov
2015-10-15 10:13 ` Nikolay Aleksandrov [this message]
2015-10-15 10:18   ` Jozsef Kadlecsik
2015-10-15 10:16 ` Jozsef Kadlecsik

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=561F7C50.6080401@cumulusnetworks.com \
    --to=nikolay@cumulusnetworks.com \
    --cc=davem@davemloft.net \
    --cc=kadlec@blackhole.kfki.hu \
    --cc=kernel@kyup.com \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=operations@siteground.com \
    --cc=pablo@netfilter.org \
    /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;
as well as URLs for NNTP newsgroup(s).