Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1224512
| From | green@linuxhacker.ru |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 17/19] staging/lustre/o2iblnd: leak cmid in kiblnd_dev_need_failover |
| Date | 2015-09-15 00:50 +0200 |
| Message-ID | <q8KJt-36x-39@gated-at.bofh.it> (permalink) |
| References | <q8KJs-36x-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Liang Zhen <liang.zhen@intel.com>
cmid created by kiblnd_dev_need_failover should always be destroyed,
however it is not the case in current implementation and we will leak
cmid when this function detected a device failover.
Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-on: http://review.whamcloud.com/14603
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6480
Reviewed-by: Isaac Huang <he.huang@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
---
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c
index c29d2ce..faa70f0 100644
--- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c
+++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c
@@ -2228,13 +2228,10 @@ static int kiblnd_dev_need_failover(kib_dev_t *dev)
return rc;
}
- if (dev->ibd_hdev->ibh_ibdev == cmid->device) {
- /* don't need device failover */
- rdma_destroy_id(cmid);
- return 0;
- }
+ rc = dev->ibd_hdev->ibh_ibdev != cmid->device; /* true for failover */
+ rdma_destroy_id(cmid);
- return 1;
+ return rc;
}
int kiblnd_dev_failover(kib_dev_t *dev)
--
2.1.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/19] Lustre fixes green@linuxhacker.ru - 2015-09-15 00:50 +0200 [PATCH 05/19] staging/lustre/ptlrpc: remove LUSTRE_MSG_MAGIC_V1 support green@linuxhacker.ru - 2015-09-15 00:50 +0200 [PATCH 13/19] staging/lustre/llite: ASSERTION( atomic_read(&d->ld_ref) == 0 ) failed green@linuxhacker.ru - 2015-09-15 00:50 +0200 [PATCH 07/19] staging/lustre/llite: deny non-root user for changelog operations green@linuxhacker.ru - 2015-09-15 00:50 +0200 [PATCH 15/19] staging/lustre: Remove unused MAY_ constants green@linuxhacker.ru - 2015-09-15 00:50 +0200 [PATCH 14/19] staging/lustre/obdclass: Eliminate hash bucket scans in lu_cache_shrink green@linuxhacker.ru - 2015-09-15 00:50 +0200 [PATCH 09/19] staging/lustre/osc: LBUG in osc_lru_reclaim green@linuxhacker.ru - 2015-09-15 00:50 +0200 [PATCH 18/19] staging/lustre/libcfs: remove unused cfs_timer_done green@linuxhacker.ru - 2015-09-15 00:50 +0200 [PATCH 02/19] staging/lustre/obdclass: reorganize busy object accounting green@linuxhacker.ru - 2015-09-15 00:50 +0200 [PATCH 17/19] staging/lustre/o2iblnd: leak cmid in kiblnd_dev_need_failover green@linuxhacker.ru - 2015-09-15 00:50 +0200 [PATCH 10/19] staging/lustre/libcfs: minor fix in cfs_hash_for_each_relax() green@linuxhacker.ru - 2015-09-15 00:50 +0200 [PATCH 01/19] staging/lustre/lnet: Reenable lnet router debugfs green@linuxhacker.ru - 2015-09-15 00:50 +0200 [PATCH 16/19] staging/lustre/osc: use global osc_rq_pool to reduce memory usage green@linuxhacker.ru - 2015-09-15 00:50 +0200
csiph-web