netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch -next] bnx2x: unlock before returning an error
@ 2012-01-25  7:59 Dan Carpenter
  2012-01-25  8:14 ` Dmitry Kravkov
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2012-01-25  7:59 UTC (permalink / raw)
  To: Eilon Greenstein, Yuval Mintz; +Cc: netdev, kernel-janitors

We introduced a new return here but forgot to drop the lock.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c
index cb6339c..69465c3 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c
@@ -1836,6 +1836,7 @@ static int bnx2x_vlan_mac_del_all(struct bnx2x *bp,
 			rc = exeq->remove(bp, exeq->owner, exeq_pos);
 			if (rc) {
 				BNX2X_ERR("Failed to remove command\n");
+				spin_unlock_bh(&exeq->lock);
 				return rc;
 			}
 			list_del(&exeq_pos->link);

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [patch -next] bnx2x: unlock before returning an error
  2012-01-25  7:59 [patch -next] bnx2x: unlock before returning an error Dan Carpenter
@ 2012-01-25  8:14 ` Dmitry Kravkov
  2012-01-25 21:59   ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Kravkov @ 2012-01-25  8:14 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: Eilon Greenstein, Yuval Mintz, netdev, kernel-janitors

On Wed, 2012-01-25 at 10:59 +0300, Dan Carpenter wrote:
> We introduced a new return here but forgot to drop the lock.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c
> index cb6339c..69465c3 100644
> --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c
> +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c
> @@ -1836,6 +1836,7 @@ static int bnx2x_vlan_mac_del_all(struct bnx2x *bp,
>  			rc = exeq->remove(bp, exeq->owner, exeq_pos);
>  			if (rc) {
>  				BNX2X_ERR("Failed to remove command\n");
> +				spin_unlock_bh(&exeq->lock);
>  				return rc;
>  			}
>  			list_del(&exeq_pos->link);
> --

Thank you, Dan.

Acked-by: Dmitry Kravkov <dmitry@broadcom.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch -next] bnx2x: unlock before returning an error
  2012-01-25  8:14 ` Dmitry Kravkov
@ 2012-01-25 21:59   ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2012-01-25 21:59 UTC (permalink / raw)
  To: dmitry; +Cc: dan.carpenter, eilong, yuvalmin, netdev, kernel-janitors

From: "Dmitry Kravkov" <dmitry@broadcom.com>
Date: Wed, 25 Jan 2012 10:14:54 +0200

> On Wed, 2012-01-25 at 10:59 +0300, Dan Carpenter wrote:
>> We introduced a new return here but forgot to drop the lock.
>> 
>> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
 ...
> Acked-by: Dmitry Kravkov <dmitry@broadcom.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-01-25 21:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-25  7:59 [patch -next] bnx2x: unlock before returning an error Dan Carpenter
2012-01-25  8:14 ` Dmitry Kravkov
2012-01-25 21:59   ` 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).