linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* osm_vl15intf.c: fixing use-after-free coredump
@ 2010-10-11 11:04 Yevgeny Kliteynik
       [not found] ` <4CB2EF36.2040209-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Yevgeny Kliteynik @ 2010-10-11 11:04 UTC (permalink / raw)
  To: Sasha Khapyorsky, Linux RDMA

p_madw is freed if responce is not expected.

Signed-off-by: Yevgeny Kliteynik <kliteyn-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
---
 opensm/opensm/osm_vl15intf.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/opensm/opensm/osm_vl15intf.c b/opensm/opensm/osm_vl15intf.c
index bb2c0c6..c845597 100644
--- a/opensm/opensm/osm_vl15intf.c
+++ b/opensm/opensm/osm_vl15intf.c
@@ -57,13 +57,14 @@
 static void vl15_send_mad(osm_vl15_t * p_vl, osm_madw_t * p_madw)
 {
 	ib_api_status_t status;
+	boolean_t resp_expected = p_madw->resp_expected;

 	/*
 	   Non-response-expected mads are not throttled on the wire
 	   since we can have no confirmation that they arrived
 	   at their destination.
 	 */
-	if (p_madw->resp_expected == TRUE)
+	if (resp_expected)
 		/*
 		   Note that other threads may not see the response MAD
 		   arrive before send() even returns.
@@ -103,7 +104,7 @@ static void vl15_send_mad(osm_vl15_t * p_vl, osm_madw_t * p_madw)
 	   qp0_mads_outstanding will be decremented by send error callback
 	   (called by osm_vendor_send() */
 	cl_atomic_dec(&p_vl->p_stats->qp0_mads_sent);
-	if (!p_madw->resp_expected)
+	if (!resp_expected)
 		cl_atomic_dec(&p_vl->p_stats->qp0_unicasts_sent);
 }

-- 
1.6.2.4

--
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: osm_vl15intf.c: fixing use-after-free coredump
       [not found] ` <4CB2EF36.2040209-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>
@ 2010-10-25 18:23   ` Sasha Khapyorsky
  0 siblings, 0 replies; 2+ messages in thread
From: Sasha Khapyorsky @ 2010-10-25 18:23 UTC (permalink / raw)
  To: kliteyn-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb; +Cc: Linux RDMA

On 13:04 Mon 11 Oct     , Yevgeny Kliteynik wrote:
> p_madw is freed if responce is not expected.
> 
> Signed-off-by: Yevgeny Kliteynik <kliteyn-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>

Applied. Thanks.

Sasha
--
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:[~2010-10-25 18:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-11 11:04 osm_vl15intf.c: fixing use-after-free coredump Yevgeny Kliteynik
     [not found] ` <4CB2EF36.2040209-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>
2010-10-25 18:23   ` Sasha Khapyorsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).