summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/qib/qib_debugfs.c
diff options
context:
space:
mode:
authorMike Marciniszyn <mike.marciniszyn@intel.com>2014-09-19 08:32:19 -0400
committerRoland Dreier <roland@purestorage.com>2014-09-19 10:18:32 -0700
commit85cbb7c728bf39c45a9789b88c9471c0d7a58b0e (patch)
tree943991994effdf8ec4d191e872b5a1d3fbcd755f /drivers/infiniband/hw/qib/qib_debugfs.c
parentf5c4984e065556b81edf3c9dadfbc8750de690fc (diff)
IB/qib: Correct reference counting in debugfs qp_stats
This particular reference count is not needed with the rcu protection, and the current code leaks a reference count, causing a hang in qib_qp_destroy(). Cc: <stable@vger.kernel.org> Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/hw/qib/qib_debugfs.c')
-rw-r--r--drivers/infiniband/hw/qib/qib_debugfs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/qib/qib_debugfs.c b/drivers/infiniband/hw/qib/qib_debugfs.c
index 799a0c3bffc4..6abd3ed3cd51 100644
--- a/drivers/infiniband/hw/qib/qib_debugfs.c
+++ b/drivers/infiniband/hw/qib/qib_debugfs.c
@@ -193,6 +193,7 @@ static void *_qp_stats_seq_start(struct seq_file *s, loff_t *pos)
struct qib_qp_iter *iter;
loff_t n = *pos;
+ rcu_read_lock();
iter = qib_qp_iter_init(s->private);
if (!iter)
return NULL;
@@ -224,7 +225,7 @@ static void *_qp_stats_seq_next(struct seq_file *s, void *iter_ptr,
static void _qp_stats_seq_stop(struct seq_file *s, void *iter_ptr)
{
- /* nothing for now */
+ rcu_read_unlock();
}
static int _qp_stats_seq_show(struct seq_file *s, void *iter_ptr)