All of lore.kernel.org
 help / color / mirror / Atom feed
From: Harald Welte <laforge@netfilter.org>
To: "David S. Miller" <davem@davemloft.net>
Cc: netfilter-devel@lists.netfilter.org, kaber@trash.net
Subject: Re: BUG() in ip_ct_event_cache_flush()?
Date: Fri, 7 Oct 2005 06:09:06 +0200	[thread overview]
Message-ID: <20051007040906.GC5953@rama> (raw)
In-Reply-To: <20051005.234046.88863607.davem@davemloft.net>

[-- Attachment #1: Type: text/plain, Size: 1346 bytes --]

On Wed, Oct 05, 2005 at 11:40:46PM -0700, David S. Miller wrote:
> 
> I've seen an OOPS backtrace with current 2.6.x kernels
> that seems to be in ip_ct_event_cache_flush().

:( do you have the oops/backtrace?

> This loop there is suspect:
> 
> 	for_each_cpu(cpu) {
> 		ecache = &per_cpu(ip_conntrack_ecache, cpu);
> 		if (ecache->ct)
> 			ip_conntrack_put(ecache->ct);
> 	}
> 
> This should use "for_each_online_cpu()" I think.  Non-possible
> cpus end up with percpu pointers being NULL or undefined.

Mh, but what happens if we take offline a cpu?  Let's say the event
cache is used on four cpus, but then one cpu goes offline.  Ideally, we
would still flush the event cache for that cpu that now has become
offline, since otherwise we loose the event.

According to the documentation in include/cpumask.h, "for_each_cpu"
actually iterates over 'num_possible_map'.  So how would we end up with
a "non-possible" cpu, according to your comment?

-- 
- Harald Welte <laforge@netfilter.org>                 http://netfilter.org/
============================================================================
  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."                    -- Paul Vixie

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2005-10-07  4:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-06  6:40 BUG() in ip_ct_event_cache_flush()? David S. Miller
2005-10-07  4:09 ` Harald Welte [this message]
2005-10-06 20:14   ` David S. Miller
2005-10-07 21:35     ` Harald Welte
2005-10-07 20:09       ` David S. Miller
2005-10-07 23:33       ` what is the purpose of "filter" table? Tadas

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=20051007040906.GC5953@rama \
    --to=laforge@netfilter.org \
    --cc=davem@davemloft.net \
    --cc=kaber@trash.net \
    --cc=netfilter-devel@lists.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.