summaryrefslogtreecommitdiffstats
path: root/net/openvswitch/datapath.h
diff options
context:
space:
mode:
authorEelco Chaudron <echaudro@redhat.com>2020-07-24 10:20:59 +0200
committerDavid S. Miller <davem@davemloft.net>2020-07-25 01:58:38 +0200
commita65878d6f00bb2d791348ae90dcc2ede1dbe2b91 (patch)
treee0a6f2c668074161bcb86722a03fec039397c3c2 /net/openvswitch/datapath.h
parentsctp: fix slab-out-of-bounds in SCTP_DELAYED_SACK processing (diff)
downloadlinux-a65878d6f00bb2d791348ae90dcc2ede1dbe2b91.tar.xz
linux-a65878d6f00bb2d791348ae90dcc2ede1dbe2b91.zip
net: openvswitch: fixes potential deadlock in dp cleanup code
The previous patch introduced a deadlock, this patch fixes it by making sure the work is canceled without holding the global ovs lock. This is done by moving the reorder processing one layer up to the netns level. Fixes: eac87c413bf9 ("net: openvswitch: reorder masks array based on usage") Reported-by: syzbot+2c4ff3614695f75ce26c@syzkaller.appspotmail.com Reported-by: syzbot+bad6507e5db05017b008@syzkaller.appspotmail.com Reviewed-by: Paolo <pabeni@redhat.com> Signed-off-by: Eelco Chaudron <echaudro@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/openvswitch/datapath.h')
-rw-r--r--net/openvswitch/datapath.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/openvswitch/datapath.h b/net/openvswitch/datapath.h
index 697a2354194b..24fcec22fde2 100644
--- a/net/openvswitch/datapath.h
+++ b/net/openvswitch/datapath.h
@@ -84,9 +84,6 @@ struct datapath {
/* Switch meters. */
struct dp_meter_table meter_tbl;
-
- /* re-balance flow masks timer */
- struct delayed_work masks_rebalance;
};
/**
@@ -135,6 +132,7 @@ struct dp_upcall_info {
struct ovs_net {
struct list_head dps;
struct work_struct dp_notify_work;
+ struct delayed_work masks_rebalance;
#if IS_ENABLED(CONFIG_NETFILTER_CONNCOUNT)
struct ovs_ct_limit_info *ct_limit_info;
#endif