From: Florian Westphal <fw@strlen.de>
To: Oleksandr Natalenko <oleksandr@natalenko.name>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH v2 0/2] segtree: move huge arrays to heap
Date: Tue, 3 Jan 2017 02:54:40 +0100 [thread overview]
Message-ID: <20170103015440.GA3354@breakpoint.cc> (raw)
In-Reply-To: <20170102195409.14669-1-oleksandr@natalenko.name>
Oleksandr Natalenko <oleksandr@natalenko.name> wrote:
> While dealing with huge sets, nft may exhaust stack
> and trigger segfault. To avoid this, lets move those
> huge arrays away from stack to heap.
>
> First patch introduces array allocation helper.
>
> Second patch modifies interval_map_decompose()
> function, allocating memory for arrays on head.
>
> Meny thanks to Florian Westphal who helped
> to sort this out.
Applied, thanks a lot! I used v1 of first patch (retaining assert()
of nmemb) and added an early return on v2 so decompose step doesn't do
anything on empty arrays, let me know if you spot a problem with it.
prev parent reply other threads:[~2017-01-03 1:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-02 19:54 [PATCH v2 0/2] segtree: move huge arrays to heap Oleksandr Natalenko
2017-01-02 19:54 ` [PATCH v2 1/2] utils: provide array allocation wrapper Oleksandr Natalenko
2017-01-02 19:54 ` [PATCH v2 2/2] segtree: allocate memory for arrays on heap Oleksandr Natalenko
2017-01-03 1:54 ` Florian Westphal [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=20170103015440.GA3354@breakpoint.cc \
--to=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=oleksandr@natalenko.name \
/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).