Thread (55 messages) flat view 55 messages, 9 authors, 2009-06-20

Re: [bug] __nf_ct_refresh_acct(): WARNING: at lib/list_debug.c:30 __list_add+0x7d/0xad()

From: Patrick McHardy <hidden>
Date: 2009-06-17 11:51:54
Also in: lkml

Patrick McHardy wrote:
Eric Dumazet wrote:
quoted
IPS_CONFIRMED_BIT is set under nf_conntrack_lock (in 
__nf_conntrack_confirm()),
we probably want to add a synchronisation under ct->lock as well,
or __nf_ct_refresh_acct() could set ct->timeout.expires to extra_jiffies,
while a different cpu could confirm the conntrack.
Before the conntrack is confirmed, it is exclusively handled by a
single CPU. I agree that we need to make sure the IPS_CONFIRMED_BIT
is visible before we add the conntrack to the hash table since the
lookup is lockless, but simply moving the set_bit before the hash
insertion should be fine I think.
A slightly changed version which moves hash insertion to the end
and adds a comment about ordering. This make sure the timer is
actually running before the conntrack can be found be other CPUs.

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help