Thread (12 messages) 12 messages, 3 authors, 2014-08-01

Re: [PATCH net-next 3/3] nftables: Convert nft_hash to use generic rhashtable

From: Patrick McHardy <hidden>
Date: 2014-08-01 15:00:10
Also in: lkml, netfilter-devel

On 1. August 2014 15:51:45 GMT+01:00, Thomas Graf [off-list ref] wrote:
On 08/01/14 at 03:12pm, Patrick McHardy wrote:
quoted
On 1. August 2014 14:49:01 GMT+01:00, Thomas Graf [off-list ref]
wrote:
quoted
quoted
On 08/01/14 at 02:21pm, Nikolay Aleksandrov wrote:
quoted
Sorry for the late response but I just got around to check the 3rd
patch now,
quoted
so my question about this fragment is: before nft_hash_remove()
would
quoted
quoted
free the
quoted
element after removal, but after this change I don't see where and
when the
quoted
removed element would get freed ?
You are right. Looking at this closer we were leaking references
even
quoted
quoted
before the change because it would not call nft_data_uninit() to
release
the data objects. So it should really just call
nft_hash_elem_destroy().
No, the data uninit is performed by the set core. Just freeing it is
fine.

OK, I can see the uninit on the data in nft_del_setelem() for maps
prior to the actual commit. The location is slightly unexpected since
the element is still findable in the hash table at that point.
That's most likely a bug from the transaction API.

Pablo?
I'll wait a short while to see if there is more feedback and resubmit
afterwards.
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help