lkml.org 
[lkml]   [2010]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] ib/ehca: fix in_wc handling in process_mad()
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 */

\
 
 \ /
  Last update: 2010-02-16 10:03    [W:0.123 / U:0.612 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site