summaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc/auerswald.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2007-05-10 23:04:14 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2007-05-22 23:45:49 -0700
commitbe23edf848b14d1b426c12f2f58e4949c4fbd695 (patch)
tree798a6f9a2d6e74d7e7d7e2de2e40c0343c17e700 /drivers/usb/misc/auerswald.c
parentfcbd963912acc0c5d51bb27f8654f2a91fcff322 (diff)
downloadblackbird-obmc-linux-be23edf848b14d1b426c12f2f58e4949c4fbd695.tar.gz
blackbird-obmc-linux-be23edf848b14d1b426c12f2f58e4949c4fbd695.zip
USB: auerswald: fix file release handler
If this down_interruptible() does fail due to signal_pending() then the state of the driver will get trashed in interesting ways, because userspace cannot and will not retry the close(). Cc: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/misc/auerswald.c')
-rw-r--r--drivers/usb/misc/auerswald.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/usb/misc/auerswald.c b/drivers/usb/misc/auerswald.c
index 88fb56d5db8f..cac1500cba62 100644
--- a/drivers/usb/misc/auerswald.c
+++ b/drivers/usb/misc/auerswald.c
@@ -1822,16 +1822,10 @@ static int auerchar_release (struct inode *inode, struct file *file)
pauerswald_t cp;
dbg("release");
- /* get the mutexes */
- if (down_interruptible (&ccp->mutex)) {
- return -ERESTARTSYS;
- }
+ down(&ccp->mutex);
cp = ccp->auerdev;
if (cp) {
- if (down_interruptible (&cp->mutex)) {
- up (&ccp->mutex);
- return -ERESTARTSYS;
- }
+ down(&cp->mutex);
/* remove an open service */
auerswald_removeservice (cp, &ccp->scontext);
/* detach from device */
OpenPOWER on IntegriCloud