[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1382017952.2045.150.camel@edumazet-glaptop.roam.corp.google.com>
Date: Thu, 17 Oct 2013 06:52:32 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: Will Deacon <will.deacon@....com>
Cc: netfilter-devel@...r.kernel.org, linux-kernel@...r.kernel.org,
Pablo Neira Ayuso <pablo@...filter.org>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Subject: Re: [PATCH] netfilter: fix ordering of jumpstack allocation and
table update
On Thu, 2013-10-17 at 14:24 +0100, Will Deacon wrote:
> During kernel stability testing on an SMP ARMv7 system, Yalin Wang
> reported the following panic from the netfilter code:
>
> On weakly ordered memory architectures, the writes to table->private
> and newinfo->jumpstack from CPU1 can be observed out of order by CPU0.
> Furthermore, on architectures which don't respect ordering of address
> dependencies (i.e. Alpha), the reads from CPU0 can also be re-ordered.
>
> This patch adds an smp_wmb() before the assignment to table->private
> (which is essentially publishing newinfo) to ensure that all writes to
> newinfo will be observed before plugging it into the table structure.
> A dependent-read barrier is also added on the consumer side, to ensure
> the same ordering requirement are also respected there.
>
> Cc: Pablo Neira Ayuso <pablo@...filter.org>
> Cc: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>
> Reported-by: Wang, Yalin <Yalin.Wang@...ymobile.com>
> Tested-by: Wang, Yalin <Yalin.Wang@...ymobile.com>
> Signed-off-by: Will Deacon <will.deacon@....com>
> ---
Nice catch !
Acked-by: Eric Dumazet <edumazet@...gle.com>
--
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