Skip to content

Commit

Permalink
net/sfc: fix adapter lock usage on rule creation
Browse files Browse the repository at this point in the history
[ upstream commit 653b285 ]

The point is that adapter lock has to be held on
list accesses, as well as when talking to the HW.

Fixes: a9825cc ("net/sfc: support flow API filters")

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
  • Loading branch information
ol-ivanmal authored and kevintraynor committed Dec 11, 2019
1 parent 759a205 commit 0f527b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/sfc/sfc_flow.c
Original file line number Diff line number Diff line change
Expand Up @@ -2314,10 +2314,10 @@ sfc_flow_create(struct rte_eth_dev *dev,
if (rc != 0)
goto fail_bad_value;

TAILQ_INSERT_TAIL(&sa->filter.flow_list, flow, entries);

sfc_adapter_lock(sa);

TAILQ_INSERT_TAIL(&sa->filter.flow_list, flow, entries);

if (sa->state == SFC_ADAPTER_STARTED) {
rc = sfc_flow_filter_insert(sa, flow);
if (rc != 0) {
Expand Down

0 comments on commit 0f527b4

Please sign in to comment.