From patchwork Fri Apr 16 12:05:05 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Khapyorsky X-Patchwork-Id: 93144 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o3GC4xjR003484 for ; Fri, 16 Apr 2010 12:04:59 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758314Ab0DPMEy (ORCPT ); Fri, 16 Apr 2010 08:04:54 -0400 Received: from mail-ww0-f46.google.com ([74.125.82.46]:55442 "EHLO mail-ww0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758305Ab0DPMEx (ORCPT ); Fri, 16 Apr 2010 08:04:53 -0400 Received: by wwb24 with SMTP id 24so1099693wwb.19 for ; Fri, 16 Apr 2010 05:04:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:received:date:from:to :cc:subject:message-id:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=3f1d8LcO6fCGWBNKSOvuY0H1ReVTa/feAzNQeGY0DRM=; b=GJvw+8Mnk1WCEqk49xHRfeboBmPjSkGsz3WLXDOgI92bwB362Qlf/RDEA5rm2NHdA/ Zpy5oJSV5XKwTjRJ+neOpOBxpLl+kpecYUpd/B+icAfnwCTCkvVm/C4C5ZlhZa3SO6ej yVhBOLGrHeUM4l8ILYx3zEoPDOl1CSpF+yjKQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=goVhYbNI7Vrz1/DvtY1hd9ZPMjXrIJJ3SoYhAlLlkEiVlvM04I/rS/3jHpfhIRuiNi ju52RF6apj3ySLl8KAPCxnbkq093w85Zh2cAETf2GqvuEIAYECNza1q7OikgIG1371sP Nm3dXJWyd4XNS6bTVvFNz1+/fApINhOUymkok= Received: by 10.216.87.79 with SMTP id x57mr1642964wee.83.1271419491442; Fri, 16 Apr 2010 05:04:51 -0700 (PDT) Received: from me.localdomain (85.64.35.106.dynamic.barak-online.net [85.64.35.106]) by mx.google.com with ESMTPS id z3sm20503369wbs.10.2010.04.16.05.04.48 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 16 Apr 2010 05:04:49 -0700 (PDT) Received: by me.localdomain (Postfix, from userid 1000) id E2A1E11F31; Fri, 16 Apr 2010 15:05:05 +0300 (IDT) Date: Fri, 16 Apr 2010 15:05:05 +0300 From: Sasha Khapyorsky To: Ira Weiny Cc: "linux-rdma@vger.kernel.org" , Hal Rosenstock Subject: Re: [PATCH] libibnetdisc: fix outstanding SMPs countung Message-ID: <20100416120505.GB11943@me> References: <20100218124933.c018a23d.weiny2@llnl.gov> <20100413163836.GM10830@me> <20100413133826.00a8afc5.weiny2@llnl.gov> <20100413134446.72eb336a.weiny2@llnl.gov> <20100414102335.GT10830@me> <0EEE4F40-F1DD-46A6-B756-3C46DA06B403@llnl.gov> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <0EEE4F40-F1DD-46A6-B756-3C46DA06B403@llnl.gov> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Fri, 16 Apr 2010 12:05:00 +0000 (UTC) diff --git a/infiniband-diags/libibnetdisc/src/query_smp.c b/infiniband-diags/libibnetdisc/src/query_smp.c index 08e3ef7..89c0b05 100644 --- a/infiniband-diags/libibnetdisc/src/query_smp.c +++ b/infiniband-diags/libibnetdisc/src/query_smp.c @@ -96,8 +96,10 @@ static int process_smp_queue(smp_engine_t * engine) if (!smp) return 0; - if ((rc = send_smp(smp, engine->ibmad_port)) != 0) + if ((rc = send_smp(smp, engine->ibmad_port)) != 0) { + free(smp); return rc; + } engine->num_smps_outstanding++; cl_qmap_insert(&engine->smps_on_wire, (uint32_t) smp->rpc.trid, (cl_map_item_t *) smp);