From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Liping Zhang <zlpnobody@163.com>
Cc: netfilter-devel@vger.kernel.org, Liping Zhang <zlpnobody@gmail.com>
Subject: Re: [PATCH nf] netfilter: nft_set_bitmap: free dummy elements when destroy the set
Date: Tue, 25 Apr 2017 11:06:44 +0200 [thread overview]
Message-ID: <20170425090644.GA2894@salvia> (raw)
In-Reply-To: <1492270656-1664-1-git-send-email-zlpnobody@163.com>
On Sat, Apr 15, 2017 at 11:37:36PM +0800, Liping Zhang wrote:
> From: Liping Zhang <zlpnobody@gmail.com>
>
> We forget to free dummy elements when deleting the set. So when I was
> running nft-test.py, I saw many kmemleak warnings:
> kmemleak: 1344 new suspected memory leaks ...
> # cat /sys/kernel/debug/kmemleak
> unreferenced object 0xffff8800631345c8 (size 32):
> comm "nft", pid 9075, jiffies 4295743309 (age 1354.815s)
> hex dump (first 32 bytes):
> f8 63 13 63 00 88 ff ff 88 79 13 63 00 88 ff ff .c.c.....y.c....
> 04 0c 00 00 00 00 00 00 00 00 00 00 08 03 00 00 ................
> backtrace:
> [<ffffffff819059da>] kmemleak_alloc+0x4a/0xa0
> [<ffffffff81288174>] __kmalloc+0x164/0x310
> [<ffffffffa061269d>] nft_set_elem_init+0x3d/0x1b0 [nf_tables]
> [<ffffffffa06130da>] nft_add_set_elem+0x45a/0x8c0 [nf_tables]
> [<ffffffffa0613645>] nf_tables_newsetelem+0x105/0x1d0 [nf_tables]
> [<ffffffffa05fe6d4>] nfnetlink_rcv+0x414/0x770 [nfnetlink]
> [<ffffffff817f0ca6>] netlink_unicast+0x1f6/0x310
> [<ffffffff817f10c6>] netlink_sendmsg+0x306/0x3b0
> ...
Applied, thanks.
prev parent reply other threads:[~2017-04-25 9:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-15 15:37 [PATCH nf] netfilter: nft_set_bitmap: free dummy elements when destroy the set Liping Zhang
2017-04-25 9:06 ` Pablo Neira Ayuso [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=20170425090644.GA2894@salvia \
--to=pablo@netfilter.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=zlpnobody@163.com \
--cc=zlpnobody@gmail.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;
as well as URLs for NNTP newsgroup(s).