* [PATCH 1/1] NET: cassini, fix lock imbalance
@ 2009-11-06 9:14 Jiri Slaby
2009-11-07 4:26 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Jiri Slaby @ 2009-11-06 9:14 UTC (permalink / raw)
To: davem; +Cc: netdev, linux-kernel, Jiri Slaby
Stanse found that one error path in cas_open omits to unlock pm_mutex.
Fix that.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
drivers/net/cassini.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c
index 05916aa..f857afe 100644
--- a/drivers/net/cassini.c
+++ b/drivers/net/cassini.c
@@ -4342,11 +4342,11 @@ static int cas_open(struct net_device *dev)
cas_unlock_all_restore(cp, flags);
}
+ err = -ENOMEM;
if (cas_tx_tiny_alloc(cp) < 0)
- return -ENOMEM;
+ goto err_unlock;
/* alloc rx descriptors */
- err = -ENOMEM;
if (cas_alloc_rxds(cp) < 0)
goto err_tx_tiny;
@@ -4386,6 +4386,7 @@ err_spare:
cas_free_rxds(cp);
err_tx_tiny:
cas_tx_tiny_free(cp);
+err_unlock:
mutex_unlock(&cp->pm_mutex);
return err;
}
--
1.6.4.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-11-07 4:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-06 9:14 [PATCH 1/1] NET: cassini, fix lock imbalance Jiri Slaby
2009-11-07 4:26 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox