[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20071220.041339.197739349.davem@davemloft.net>
Date: Thu, 20 Dec 2007 04:13:39 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: herbert@...dor.apana.org.au
Cc: dada1@...mosbay.com, kuznet@....inr.ac.ru, wangchen@...fujitsu.com,
gerrit@....abdn.ac.uk, andi@...stfloor.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, clameter@....com, mingo@...e.hu
Subject: Re: [SNMP]: Fix SNMP counters with PREEMPT
From: Herbert Xu <herbert@...dor.apana.org.au>
Date: Sun, 16 Dec 2007 10:30:25 +0800
> On Sat, Dec 15, 2007 at 06:03:19PM +0100, Eric Dumazet wrote:
> >
> > How come you change SNMP_INC_STATS_USER() but not SNMP_INC_STATS() ?
>
> Heh, my brain must have blocked me from seeing it because it's
> too hard :)
>
> Let's fix it the stupid way first and I'll do a local_t conversion
> later.
>
> [SNMP]: Fix SNMP counters with PREEMPT
>
> The SNMP macros use raw_smp_processor_id() in process context
> which is illegal because the process may be preempted and then
> migrated to another CPU.
>
> This patch makes it use get_cpu/put_cpu to disable preemption.
>
> Signed-off-by: Herbert Xu <herbert@...dor.apana.org.au>
I just noticed this and replaced the other SNMP fix patch
with this one.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists