* [patch 0/2] s390: network bug fixes for net
@ 2012-10-16 5:21 frank.blaschka
2012-10-16 5:21 ` [patch 1/2] [PATCH] smsgiucv: reestablish IUCV path after resume frank.blaschka
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: frank.blaschka @ 2012-10-16 5:21 UTC (permalink / raw)
To: davem; +Cc: netdev, linux-s390
Hi Dave,
here are some bug fixes for net.
shortlog:
Hendrik Brueckner (1)
smsgiucv: reestablish IUCV path after resume
Stefan Raspl (1)
qeth: fix deadlock between recovery and bonding driver
Thanks,
Frank
^ permalink raw reply [flat|nested] 4+ messages in thread
* [patch 1/2] [PATCH] smsgiucv: reestablish IUCV path after resume
2012-10-16 5:21 [patch 0/2] s390: network bug fixes for net frank.blaschka
@ 2012-10-16 5:21 ` frank.blaschka
2012-10-16 5:21 ` [patch 2/2] [PATCH] qeth: fix deadlock between recovery and bonding driver frank.blaschka
2012-10-16 18:42 ` [patch 0/2] s390: network bug fixes for net David Miller
2 siblings, 0 replies; 4+ messages in thread
From: frank.blaschka @ 2012-10-16 5:21 UTC (permalink / raw)
To: davem; +Cc: netdev, linux-s390, Ursula Braun
[-- Attachment #1: 600-smsg-path-resume.diff --]
[-- Type: text/plain, Size: 894 bytes --]
From: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
smsg_pm_restore_thaw() uses wrong checking before reconnecting
the IUCV path to *MSG. It is corrected with this patch.
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
---
drivers/s390/net/smsgiucv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/s390/net/smsgiucv.c b/drivers/s390/net/smsgiucv.c
index 207b7d7..d8f990b 100644
--- a/drivers/s390/net/smsgiucv.c
+++ b/drivers/s390/net/smsgiucv.c
@@ -157,7 +157,7 @@ static int smsg_pm_restore_thaw(struct device *dev)
#ifdef CONFIG_PM_DEBUG
printk(KERN_WARNING "smsg_pm_restore_thaw\n");
#endif
- if (smsg_path && iucv_path_connected) {
+ if (smsg_path && !iucv_path_connected) {
memset(smsg_path, 0, sizeof(*smsg_path));
smsg_path->msglim = 255;
smsg_path->flags = 0;
--
1.7.11.7
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [patch 2/2] [PATCH] qeth: fix deadlock between recovery and bonding driver
2012-10-16 5:21 [patch 0/2] s390: network bug fixes for net frank.blaschka
2012-10-16 5:21 ` [patch 1/2] [PATCH] smsgiucv: reestablish IUCV path after resume frank.blaschka
@ 2012-10-16 5:21 ` frank.blaschka
2012-10-16 18:42 ` [patch 0/2] s390: network bug fixes for net David Miller
2 siblings, 0 replies; 4+ messages in thread
From: frank.blaschka @ 2012-10-16 5:21 UTC (permalink / raw)
To: davem; +Cc: netdev, linux-s390, Stefan Raspl
[-- Attachment #1: 601-qeth-bonding-deadlock.diff --]
[-- Type: text/plain, Size: 2982 bytes --]
From: Stefan Raspl <raspl@linux.vnet.ibm.com>
The recovery thread, when failing, tears down the respective interface. To do
so, it needs to obtain the rtnl lock first, as the interface configuration is
changed.
If another process tries to modify an interface setting at the same time, that
process can obtain the rtnl lock first, but the respective callback in the qeth
driver will block until recovery has completed - which cannot happen since the
calling process already obtained it.
In one particular case, the bonding driver acquired the rtnl lock to modify the
card's MAC address, while the recovery failed at the same time due to the card
being removed. Hence qeth_l2_set_mac_address (implicitly holding the rtnl lock)
was waiting on qeth_l2_recover, which deadlocked when waiting on the rtnl lock.
This patch uses rtnl_trylock instead of rtnl_lock in the recovery thread. If the
lock cannot be obtained, the interface will be left up, but the card state
remains in CARD_STATE_RECOVER, which will prevent any further activities on the
card.
Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Reviewed-by: Ursula Braun <ursula.braun@de.ibm.com>
---
drivers/s390/net/qeth_l2_main.c | 11 ++++++-----
drivers/s390/net/qeth_l3_main.c | 11 ++++++-----
2 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c
index 2db4093..e67e025 100644
--- a/drivers/s390/net/qeth_l2_main.c
+++ b/drivers/s390/net/qeth_l2_main.c
@@ -1141,11 +1141,12 @@ static int qeth_l2_recover(void *ptr)
dev_info(&card->gdev->dev,
"Device successfully recovered!\n");
else {
- rtnl_lock();
- dev_close(card->dev);
- rtnl_unlock();
- dev_warn(&card->gdev->dev, "The qeth device driver "
- "failed to recover an error on the device\n");
+ if (rtnl_trylock()) {
+ dev_close(card->dev);
+ rtnl_unlock();
+ dev_warn(&card->gdev->dev, "The qeth device driver "
+ "failed to recover an error on the device\n");
+ }
}
qeth_clear_thread_start_bit(card, QETH_RECOVER_THREAD);
qeth_clear_thread_running_bit(card, QETH_RECOVER_THREAD);
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c
index 4cd310c..5ba3906 100644
--- a/drivers/s390/net/qeth_l3_main.c
+++ b/drivers/s390/net/qeth_l3_main.c
@@ -3510,11 +3510,12 @@ static int qeth_l3_recover(void *ptr)
dev_info(&card->gdev->dev,
"Device successfully recovered!\n");
else {
- rtnl_lock();
- dev_close(card->dev);
- rtnl_unlock();
- dev_warn(&card->gdev->dev, "The qeth device driver "
- "failed to recover an error on the device\n");
+ if (rtnl_trylock()) {
+ dev_close(card->dev);
+ rtnl_unlock();
+ dev_warn(&card->gdev->dev, "The qeth device driver "
+ "failed to recover an error on the device\n");
+ }
}
qeth_clear_thread_start_bit(card, QETH_RECOVER_THREAD);
qeth_clear_thread_running_bit(card, QETH_RECOVER_THREAD);
--
1.7.11.7
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [patch 0/2] s390: network bug fixes for net
2012-10-16 5:21 [patch 0/2] s390: network bug fixes for net frank.blaschka
2012-10-16 5:21 ` [patch 1/2] [PATCH] smsgiucv: reestablish IUCV path after resume frank.blaschka
2012-10-16 5:21 ` [patch 2/2] [PATCH] qeth: fix deadlock between recovery and bonding driver frank.blaschka
@ 2012-10-16 18:42 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2012-10-16 18:42 UTC (permalink / raw)
To: frank.blaschka; +Cc: netdev, linux-s390
From: frank.blaschka@de.ibm.com
Date: Tue, 16 Oct 2012 07:21:16 +0200
> Hi Dave,
>
> here are some bug fixes for net.
>
> shortlog:
>
> Hendrik Brueckner (1)
> smsgiucv: reestablish IUCV path after resume
>
> Stefan Raspl (1)
> qeth: fix deadlock between recovery and bonding driver
Both applied, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-10-16 18:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-16 5:21 [patch 0/2] s390: network bug fixes for net frank.blaschka
2012-10-16 5:21 ` [patch 1/2] [PATCH] smsgiucv: reestablish IUCV path after resume frank.blaschka
2012-10-16 5:21 ` [patch 2/2] [PATCH] qeth: fix deadlock between recovery and bonding driver frank.blaschka
2012-10-16 18:42 ` [patch 0/2] s390: network bug fixes for net David Miller
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).