From: Jan Karcher <jaka@linux.ibm.com>
To: David Miller <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>
Cc: netdev@vger.kernel.org, linux-s390@vger.kernel.org,
Heiko Carstens <hca@linux.ibm.com>,
Alexandra Winter <wintera@linux.ibm.com>,
Wenjia Zhang <wenjia@linux.ibm.com>,
Thorsten Winkler <twinkler@linux.ibm.com>,
Stefan Raspl <raspl@linux.ibm.com>,
Karsten Graul <kgraul@linux.ibm.com>,
Jan Karcher <jaka@linux.ibm.com>,
Nils Hoppmann <niho@linux.ibm.com>,
Halil Pasic <pasic@linux.ibm.com>,
Tony Lu <tonylu@linux.alibaba.com>,
Wen Gu <guwen@linux.alibaba.com>
Subject: [net-next 1/8] net/smc: Terminate connections prior to device removal
Date: Mon, 16 Jan 2023 10:27:05 +0100 [thread overview]
Message-ID: <20230116092712.10176-2-jaka@linux.ibm.com> (raw)
In-Reply-To: <20230116092712.10176-1-jaka@linux.ibm.com>
From: Stefan Raspl <raspl@linux.ibm.com>
Removing an ISM device prior to terminating its associated connections
doesn't end well.
Signed-off-by: Stefan Raspl <raspl@linux.ibm.com>
Signed-off-by: Jan Karcher <jaka@linux.ibm.com>
Signed-off-by: Wenjia Zhang <wenjia@linux.ibm.com>
---
net/smc/smc_ism.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/smc/smc_ism.c b/net/smc/smc_ism.c
index 911fe08bc54b..28e1641f990c 100644
--- a/net/smc/smc_ism.c
+++ b/net/smc/smc_ism.c
@@ -462,11 +462,11 @@ void smcd_unregister_dev(struct smcd_dev *smcd)
{
pr_warn_ratelimited("smc: removing smcd device %s\n",
dev_name(&smcd->dev));
+ smcd->going_away = 1;
+ smc_smcd_terminate_all(smcd);
mutex_lock(&smcd_dev_list.mutex);
list_del_init(&smcd->list);
mutex_unlock(&smcd_dev_list.mutex);
- smcd->going_away = 1;
- smc_smcd_terminate_all(smcd);
destroy_workqueue(smcd->event_wq);
device_del(&smcd->dev);
--
2.25.1
next prev parent reply other threads:[~2023-01-16 9:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-16 9:27 [net-next 0/8] drivers/s390/net/ism: Add generalized interface Jan Karcher
2023-01-16 9:27 ` Jan Karcher [this message]
2023-01-16 9:27 ` [net-next 2/8] net/ism: Add missing calls to disable bus-mastering Jan Karcher
2023-01-16 9:27 ` [net-next 3/8] s390/ism: Introduce struct ism_dmb Jan Karcher
2023-01-16 9:27 ` [net-next 4/8] net/ism: Add new API for client registration Jan Karcher
2023-01-16 9:27 ` [net-next 5/8] net/smc: Register SMC-D as ISM client Jan Karcher
2023-01-16 9:27 ` [net-next 6/8] net/smc: Separate SMC-D and ISM APIs Jan Karcher
2023-01-16 9:27 ` [net-next 7/8] s390/ism: Consolidate SMC-D-related code Jan Karcher
2023-01-16 9:27 ` [net-next 8/8] net/smc: De-tangle ism and smc device initialization Jan Karcher
2023-01-18 3:28 ` Jakub Kicinski
2023-01-18 9:55 ` Jan Karcher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230116092712.10176-2-jaka@linux.ibm.com \
--to=jaka@linux.ibm.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=guwen@linux.alibaba.com \
--cc=hca@linux.ibm.com \
--cc=kgraul@linux.ibm.com \
--cc=kuba@kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=niho@linux.ibm.com \
--cc=pabeni@redhat.com \
--cc=pasic@linux.ibm.com \
--cc=raspl@linux.ibm.com \
--cc=tonylu@linux.alibaba.com \
--cc=twinkler@linux.ibm.com \
--cc=wenjia@linux.ibm.com \
--cc=wintera@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).