]> 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)
commitebe3a33390320e86f39cbeb0dd492682731751ab
treeb87ff518c2412230064a64641109ba9a0267c628
parenta44c17141596212d61b37bad4e4bca5ed2f243b7
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: 96fc5c847c20 ("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