summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ipath/ipath_diag.c
diff options
context:
space:
mode:
authorBryan O'Sullivan <bos@pathscale.com>2006-04-24 14:22:57 -0700
committerRoland Dreier <rolandd@cisco.com>2006-05-01 12:14:11 -0700
commit755e4ca4a9885b79a14169ab5b615920eb38a32a (patch)
treedf85b5a5f16f25db7f6d106c69f4ddb10b9f1880 /drivers/infiniband/hw/ipath/ipath_diag.c
parent254abfd33a214617deb916585b306faee834c97f (diff)
downloadop-kernel-dev-755e4ca4a9885b79a14169ab5b615920eb38a32a.zip
op-kernel-dev-755e4ca4a9885b79a14169ab5b615920eb38a32a.tar.gz
IB/ipath: fix race with exposing reset file
We were accidentally exposing the "reset" sysfs file more than once per device. Signed-off-by: Bryan O'Sullivan <bos@pathscale.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_diag.c')
-rw-r--r--drivers/infiniband/hw/ipath/ipath_diag.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_diag.c b/drivers/infiniband/hw/ipath/ipath_diag.c
index 7d3fb69..28ddceb 100644
--- a/drivers/infiniband/hw/ipath/ipath_diag.c
+++ b/drivers/infiniband/hw/ipath/ipath_diag.c
@@ -277,13 +277,14 @@ static int ipath_diag_open(struct inode *in, struct file *fp)
bail:
spin_unlock_irqrestore(&ipath_devs_lock, flags);
- mutex_unlock(&ipath_mutex);
/* Only expose a way to reset the device if we
make it into diag mode. */
if (ret == 0)
ipath_expose_reset(&dd->pcidev->dev);
+ mutex_unlock(&ipath_mutex);
+
return ret;
}
OpenPOWER on IntegriCloud