Re: [PATCH] inet: further fixes of possible seqlock deadlocks

From: Hannes Frederic Sowa
Date: Thu Nov 28 2013 - 17:19:45 EST


On Thu, Nov 28, 2013 at 10:27:00PM +0100, Hannes Frederic Sowa wrote:
> > > @@ -1524,8 +1524,8 @@ int ip6_push_pending_frames(struct sock *sk)
> > > if (proto == IPPROTO_ICMPV6) {
> > > struct inet6_dev *idev = ip6_dst_idev(skb_dst(skb));
> > >
> > > - ICMP6MSGOUT_INC_STATS_BH(net, idev, icmp6_hdr(skb)->icmp6_type);
> > > - ICMP6_INC_STATS_BH(net, idev, ICMP6_MIB_OUTMSGS);
> > > + ICMP6MSGOUT_INC_STATS(net, idev, icmp6_hdr(skb)->icmp6_type);
> > > + ICMP6_INC_STATS(net, idev, ICMP6_MIB_OUTMSGS);
> >
> > I am not sure we use a seqlock for ICMP stats.
> >
> > seqlocks were used for 64bit IP stats
>
> True, atomic longs get used here in both cases.

I don't really understand why we distinguish between _BH and plain ICMP stat
calls then.

The non-_BH versions deactivate interrupts when updating the per-cpu counter.

--
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/