aboutsummaryrefslogtreecommitdiffstats
path: root/net/smc/smc_core.h
diff options
context:
space:
mode:
authorKarsten Graul <kgraul@linux.ibm.com>2020-07-08 17:05:11 +0200
committerDavid S. Miller <davem@davemloft.net>2020-07-08 12:35:15 -0700
commit6778a6bed09b58beca936a675e9dd195c0986580 (patch)
treeb87ff518c2412230064a64641109ba9a0267c628 /net/smc/smc_core.h
parentnet: atlantic: fix ip dst and ipv6 address filters (diff)
downloadlinux-dev-6778a6bed09b58beca936a675e9dd195c0986580.tar.xz
linux-dev-6778a6bed09b58beca936a675e9dd195c0986580.zip
net/smc: separate LLC wait queues for flow and messages
There might be races in scenarios where both SMC link groups are on the same system. Prevent that by creating separate wait queues for LLC flows and messages. Switch to non-interruptable versions of wait_event() and wake_up() for the llc flow waiter to make sure the waiters get control sequentially. Fine tune the llc_flow_lock to include the assignment of the message. Write to system log when an unexpected message was dropped. And remove an extra indirection and use the existing local variable lgr in smc_llc_enqueue(). Fixes: 555da9af827d ("net/smc: add event-based llc_flow framework") Reviewed-by: Ursula Braun <ubraun@linux.ibm.com> Signed-off-by: Karsten Graul <kgraul@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/smc/smc_core.h')
-rw-r--r--net/smc/smc_core.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/smc/smc_core.h b/net/smc/smc_core.h
index 86d160f0d187..c3ff512fd891 100644
--- a/net/smc/smc_core.h
+++ b/net/smc/smc_core.h
@@ -262,8 +262,10 @@ struct smc_link_group {
struct work_struct llc_del_link_work;
struct work_struct llc_event_work;
/* llc event worker */
- wait_queue_head_t llc_waiter;
+ wait_queue_head_t llc_flow_waiter;
/* w4 next llc event */
+ wait_queue_head_t llc_msg_waiter;
+ /* w4 next llc msg */
struct smc_llc_flow llc_flow_lcl;
/* llc local control field */
struct smc_llc_flow llc_flow_rmt;