[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20140922.160011.2111690808287706789.davem@davemloft.net>
Date: Mon, 22 Sep 2014 16:00:11 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: john.fastabend@...il.com
Cc: xiyou.wangcong@...il.com, jhs@...atatu.com, eric.dumazet@...il.com,
netdev@...r.kernel.org
Subject: Re: [net-next PATCH v2 2/2] net: sched: cls_u32 changes to knode
must appear atomic to readers
From: John Fastabend <john.fastabend@...il.com>
Date: Fri, 19 Sep 2014 21:50:34 -0700
> Changes to the cls_u32 classifier must appear atomic to the
> readers. Before this patch if a change is requested for both
> the exts and ifindex, first the ifindex is updated then the
> exts with tcf_exts_change(). This opens a small window where
> a reader can have a exts chain with an incorrect ifindex. This
> violates the the RCU semantics.
>
> Here we resolve this by always passing u32_set_parms() a copy
> of the tc_u_knode to work on and then inserting it into the hash
> table after the updates have been successfully applied.
>
> Tested with the following short script:
...
> CC: Eric Dumazet <edumazet@...gle.com>
> CC: Jamal Hadi Salim <jhs@...atatu.com>
> Signed-off-by: John Fastabend <john.r.fastabend@...el.com>
Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists