[openib-general] [kDAPL][PATCH] fix panic in server side

Sean Hefty mshefty at ichips.intel.com
Wed May 4 15:35:18 PDT 2005


Tom Duffy wrote:
> Index: dapl_openib_cm.c
> ===================================================================
> --- linux-kernel/dat-provider/dapl_openib_cm.c	(revision 2257)
> +++ linux-kernel/dat-provider/dapl_openib_cm.c	(working copy)
> @@ -227,6 +227,9 @@ int dapl_cm_passive_cb_handler(struct ib
>  {
>  	int ret = 0;
>  
> +	if (!comm_id)
> +		return -1;
> +
>  	switch (comm_id->state) {
>  	case IB_CM_IDLE:

Separate issue here...

The state of the cm_id was exposed more for debugging purposes than for use 
by the consumer.  The state is protected by locks within the CM and can 
change at anytime, depending on which messages are being processed.  What 
should be checked here is the event that's being reported.

There could be multiple callbacks invoked in succession, all with the cm_id 
state set to idle.

- Sean



More information about the general mailing list