RDMA/siw: Fix tx thread initialization.
authorBernard Metzler <bmt@zurich.ibm.com>
Fri, 28 Jul 2023 11:44:18 +0000 (13:44 +0200)
committerLeon Romanovsky <leon@kernel.org>
Mon, 31 Jul 2023 07:05:23 +0000 (10:05 +0300)
commit91f36237b4b9bdce7610c7450a906d46704a566a
treed41b0b47884b3f4656d202143d43ffe0dcbc3d89
parenta45e5f1859579f88df624997c38c05706f9015e3
RDMA/siw: Fix tx thread initialization.

Immediately removing the siw module after insertion may
crash in siw_stop_tx_thread(), if the according thread did
not yet had a chance to initialize its wait queue and
siw_stop_tx_thread() tries to wakeup that thread. Initializing
the threads state before spwaning it fixes it.

Reported-by: Guoqing Jiang <guoqing.jiang@linux.dev>
Signed-off-by: Bernard Metzler <bmt@zurich.ibm.com>
Link: https://lore.kernel.org/r/20230728114418.124328-1-bmt@zurich.ibm.com
Tested-by: Guoqing Jiang <guoqing.jiang@linux.dev>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/sw/siw/siw.h
drivers/infiniband/sw/siw/siw_main.c
drivers/infiniband/sw/siw/siw_qp_tx.c