public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ib/ehca: fix in_wc handling in process_mad()
@ 2010-02-16  8:59 Alexander Schmidt
  2010-02-19 19:14 ` Roland Dreier
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Schmidt @ 2010-02-16  8:59 UTC (permalink / raw)
  To: Roland Dreier, Linux RDMA
  Cc: lkml, Christoph Raisch, Stefan Roscher, Hoang-Nam Nguyen,
	Joachim Fenkes, of-ewg

If the caller does not pass a valid in_wc to process_mad(),
return MAD failure as it is not possible to generate a valid
MAD redirect response.

Signed-off-by: Alexander Schmidt <alexs@linux.vnet.ibm.com>
---

Hi Roland,

this is another patch we would like to get in your next tree for
2.6.34.

 drivers/infiniband/hw/ehca/ehca_sqp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-2.6.orig/drivers/infiniband/hw/ehca/ehca_sqp.c
+++ linux-2.6/drivers/infiniband/hw/ehca/ehca_sqp.c
@@ -222,7 +222,7 @@ int ehca_process_mad(struct ib_device *i
 {
 	int ret;
 
-	if (!port_num || port_num > ibdev->phys_port_cnt)
+	if (!port_num || port_num > ibdev->phys_port_cnt || !in_wc)
 		return IB_MAD_RESULT_FAILURE;
 
 	/* accept only pma request */

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] ib/ehca: fix in_wc handling in process_mad()
  2010-02-16  8:59 [PATCH] ib/ehca: fix in_wc handling in process_mad() Alexander Schmidt
@ 2010-02-19 19:14 ` Roland Dreier
  0 siblings, 0 replies; 2+ messages in thread
From: Roland Dreier @ 2010-02-19 19:14 UTC (permalink / raw)
  To: Alexander Schmidt
  Cc: Linux RDMA, lkml, Christoph Raisch, Stefan Roscher,
	Hoang-Nam Nguyen, Joachim Fenkes, of-ewg

thanks, applied.
-- 
Roland Dreier  <rolandd@cisco.com>
For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/index.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-02-19 19:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-16  8:59 [PATCH] ib/ehca: fix in_wc handling in process_mad() Alexander Schmidt
2010-02-19 19:14 ` Roland Dreier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox