* [PATCHv2 1/4 infiniband-diags] ibqueryerrors: Fix crash when no SM is running
@ 2015-04-26 19:33 Hal Rosenstock
[not found] ` <553D3D98.3040905-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Hal Rosenstock @ 2015-04-26 19:33 UTC (permalink / raw)
To: Ira Weiny
Cc: Vladimir Koushnir,
linux-rdma (linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org)
From: Vladimir Koushnir <vladimirk-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Date: Tue, 21 Apr 2015 17:12:05 +0300
Handle sa_get_handle error in path_record_query
Signed-off-by: Vladimir Koushnir <vladimirk-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Signed-off-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
Changes since v1:
Added my signoff on this patch
src/ibqueryerrors.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/ibqueryerrors.c b/src/ibqueryerrors.c
index 8fbb9d1..97a555d 100644
--- a/src/ibqueryerrors.c
+++ b/src/ibqueryerrors.c
@@ -326,7 +326,9 @@ static int path_record_query(ib_gid_t sgid,uint64_t dguid)
uint8_t reversible = 0;
struct sa_handle * h;
- h = sa_get_handle();
+ if (!(h = sa_get_handle()))
+ return -1;
+
ibd_timeout = DEFAULT_HALF_WORLD_PR_TIMEOUT;
memset(&pr, 0, sizeof(pr));
--
1.7.8.2
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCHv2 1/4 infiniband-diags] ibqueryerrors: Fix crash when no SM is running
[not found] ` <553D3D98.3040905-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
@ 2015-07-03 15:22 ` ira.weiny
0 siblings, 0 replies; 2+ messages in thread
From: ira.weiny @ 2015-07-03 15:22 UTC (permalink / raw)
To: Hal Rosenstock
Cc: Vladimir Koushnir,
linux-rdma (linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org)
On Sun, Apr 26, 2015 at 03:33:44PM -0400, Hal Rosenstock wrote:
> From: Vladimir Koushnir <vladimirk-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Date: Tue, 21 Apr 2015 17:12:05 +0300
>
> Handle sa_get_handle error in path_record_query
>
> Signed-off-by: Vladimir Koushnir <vladimirk-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Signed-off-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Thanks applied,
Ira
> ---
> Changes since v1:
> Added my signoff on this patch
>
> src/ibqueryerrors.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/src/ibqueryerrors.c b/src/ibqueryerrors.c
> index 8fbb9d1..97a555d 100644
> --- a/src/ibqueryerrors.c
> +++ b/src/ibqueryerrors.c
> @@ -326,7 +326,9 @@ static int path_record_query(ib_gid_t sgid,uint64_t dguid)
> uint8_t reversible = 0;
> struct sa_handle * h;
>
> - h = sa_get_handle();
> + if (!(h = sa_get_handle()))
> + return -1;
> +
> ibd_timeout = DEFAULT_HALF_WORLD_PR_TIMEOUT;
> memset(&pr, 0, sizeof(pr));
>
> --
> 1.7.8.2
>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-07-03 15:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-26 19:33 [PATCHv2 1/4 infiniband-diags] ibqueryerrors: Fix crash when no SM is running Hal Rosenstock
[not found] ` <553D3D98.3040905-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2015-07-03 15:22 ` ira.weiny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox