diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2007-05-10 23:04:14 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-05-22 23:45:49 -0700 |
commit | be23edf848b14d1b426c12f2f58e4949c4fbd695 (patch) | |
tree | 798a6f9a2d6e74d7e7d7e2de2e40c0343c17e700 /drivers/usb/misc/auerswald.c | |
parent | fcbd963912acc0c5d51bb27f8654f2a91fcff322 (diff) | |
download | talos-obmc-linux-be23edf848b14d1b426c12f2f58e4949c4fbd695.tar.gz talos-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.c | 10 |
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 */ |