[ovs-dev] [PATCH net v4] net: openvswitch: fix to make sure flow_lookup() is not preempted

Jakub Kicinski kuba at kernel.org
Sun Oct 18 19:42:54 UTC 2020

On Sat, 17 Oct 2020 20:24:51 +0200 Eelco Chaudron wrote:
> The flow_lookup() function uses per CPU variables, which must be called
> with BH disabled. However, this is fine in the general NAPI use case
> where the local BH is disabled. But, it's also called from the netlink
> context. The below patch makes sure that even in the netlink path, the
> BH is disabled.
> In addition, u64_stats_update_begin() requires a lock to ensure one writer
> which is not ensured here. Making it per-CPU and disabling NAPI (softirq)
> ensures that there is always only one writer.
> Fixes: eac87c413bf9 ("net: openvswitch: reorder masks array based on usage")
> Reported-by: Juri Lelli <jlelli at redhat.com>
> Signed-off-by: Eelco Chaudron <echaudro at redhat.com>

Applied and queued for 5.9.2. Thanks Eelco!

More information about the dev mailing list