[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1236804460-1432-1-git-send-email-jirislaby@gmail.com>
Date: Wed, 11 Mar 2009 21:47:36 +0100
From: Jiri Slaby <jirislaby@...il.com>
To: gregkh@...e.de
Cc: linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
Jiri Slaby <jirislaby@...il.com>,
Simon Arlott <cxacru@...e.lp0.eu>
Subject: [PATCH 1/5] USB: atm/cxacru, fix lock imbalance
We do not hold mutex in one place in cxacru_cm, but unlock it on fail path.
Fix this.
Signed-off-by: Jiri Slaby <jirislaby@...il.com>
Cc: Simon Arlott <cxacru@...e.lp0.eu>
---
drivers/usb/atm/cxacru.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/usb/atm/cxacru.c b/drivers/usb/atm/cxacru.c
index 5ed4ae0..6789089 100644
--- a/drivers/usb/atm/cxacru.c
+++ b/drivers/usb/atm/cxacru.c
@@ -485,7 +485,7 @@ static int cxacru_cm(struct cxacru_data *instance, enum cxacru_cm_request cm,
usb_err(instance->usbatm, "requested transfer size too large (%d, %d)\n",
wbuflen, rbuflen);
ret = -ENOMEM;
- goto fail;
+ goto err;
}
mutex_lock(&instance->cm_serialize);
@@ -565,6 +565,7 @@ static int cxacru_cm(struct cxacru_data *instance, enum cxacru_cm_request cm,
dbg("cm %#x", cm);
fail:
mutex_unlock(&instance->cm_serialize);
+err:
return ret;
}
--
1.6.2
caught by stanse
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists