Re: [PATCH 4/4] [RFC] ipv6: Fix for possible ipv6 seqlock deadlock
From: Eric Dumazet
Date: Mon Oct 07 2013 - 19:54:28 EST
On Mon, 2013-10-07 at 15:52 -0700, John Stultz wrote:
> While enabling lockdep on seqlocks, I ran across the warning below
> caused by the ipv6 stats being updated in both irq and non-irq context.
You mean a lockdep warning on a seqcount in this context, right ?
>
> This patch changes from IP6_INC_STATS_BH to IP6_INC_STATS (suggested
> by Eric Dumazet) to resolve this problem.
...
> Cc: Eric Dumazet <eric.dumazet@xxxxxxxxx>
> Cc: Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxxxx>
> Cc: Steven Rostedt <rostedt@xxxxxxxxxxx>
> Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
> Cc: Ingo Molnar <mingo@xxxxxxxxxx>
> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> Cc: "David S. Miller" <davem@xxxxxxxxxxxxx>
> Cc: Alexey Kuznetsov <kuznet@xxxxxxxxxxxxx>
> Cc: James Morris <jmorris@xxxxxxxxx>
> Cc: Hideaki YOSHIFUJI <yoshfuji@xxxxxxxxxxxxxx>
> Cc: Patrick McHardy <kaber@xxxxxxxxx>
> Signed-off-by: John Stultz <john.stultz@xxxxxxxxxx>
> ---
> net/ipv6/ip6_output.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
> index 3a692d5..7e63c1e 100644
> --- a/net/ipv6/ip6_output.c
> +++ b/net/ipv6/ip6_output.c
> @@ -909,7 +909,7 @@ static int ip6_dst_lookup_tail(struct sock *sk,
>
> out_err_release:
> if (err == -ENETUNREACH)
> - IP6_INC_STATS_BH(net, NULL, IPSTATS_MIB_OUTNOROUTES);
> + IP6_INC_STATS(net, NULL, IPSTATS_MIB_OUTNOROUTES);
> dst_release(*dst);
> *dst = NULL;
> return err;
This one is certainly a bug fix, David please consider adding it to your
net tree
Bug added in commit ca46f9c834913f ("[IPv6] SNMP: Increment OutNoRoutes
when connecting to unreachable network")
Acked-by: Eric Dumazet <edumazet@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/