]> git.baikalelectronics.ru Git - kernel.git/commit
net/smc: separate LLC wait queues for flow and messages
authorKarsten Graul <kgraul@linux.ibm.com>
Wed, 8 Jul 2020 15:05:11 +0000 (17:05 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 8 Jul 2020 19:35:15 +0000 (12:35 -0700)
commit5b9dfe3da5b68dce1a1d7878c227b1c2f6f8f590
treeb87ff518c2412230064a64641109ba9a0267c628
parent790ce6590b8ddc03dbdcbd7a286d37f0fe2984fe
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: 749a46cd1ae9 ("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>
net/smc/smc_core.c
net/smc/smc_core.h
net/smc/smc_llc.c