From patchwork Mon Mar 25 12:08:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 2330811 X-Patchwork-Delegate: hal@mellanox.com Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 7F20FDF24C for ; Mon, 25 Mar 2013 12:08:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756640Ab3CYMIL (ORCPT ); Mon, 25 Mar 2013 08:08:11 -0400 Received: from mail-ee0-f48.google.com ([74.125.83.48]:55561 "EHLO mail-ee0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756585Ab3CYMIK (ORCPT ); Mon, 25 Mar 2013 08:08:10 -0400 Received: by mail-ee0-f48.google.com with SMTP id b15so284687eek.21 for ; Mon, 25 Mar 2013 05:08:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:cc :subject:content-type:content-transfer-encoding:x-gm-message-state; bh=lYaBC05Vn3bqwRc2oQAwDdv6Ox28gL+22Aw1ipMeoaM=; b=dQqQcU2VFilj6Uxvmtg1bDRfmB/T7aWE+nTeeobIOLYfkiVhYmq5L0btwkvh8RwK49 9OR50pW/fxgIkrWvi5BjbrgVPisWerUIm8p6eiFllHDcDIjOUkV7cAbp68l3et2v05qt 7tWuFLvCFHWpWgk1bCbRJ0gAcVOhTrufiDF5jtxGR9KsYOG9RsHC7gB83bWaBJDV3ryn fETZ0RcylN6DFFzBuSEjc/FVTlWTltK4et5meixo09Tqo4xPHva6j2oy47mIiK+vpZLp pS+otWT/DKpzPazqsCIORQpO5gjo6IzhkR46g9sXu1/DHj2/GR37/xN2CcuEJZBpceJt +slA== X-Received: by 10.14.223.69 with SMTP id u45mr33247480eep.23.1364213288841; Mon, 25 Mar 2013 05:08:08 -0700 (PDT) Received: from [192.168.1.102] (c-71-234-225-85.hsd1.ct.comcast.net. [71.234.225.85]) by mx.google.com with ESMTPS id s3sm18624846eem.4.2013.03.25.05.08.07 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 25 Mar 2013 05:08:08 -0700 (PDT) Message-ID: <51503E25.4000608@dev.mellanox.co.il> Date: Mon, 25 Mar 2013 08:08:05 -0400 From: Hal Rosenstock User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 MIME-Version: 1.0 To: "linux-rdma (linux-rdma@vger.kernel.org)" CC: Jens Domke , Ammar Haj Hamad Subject: [PATCH] opensm: fix dfsssp uninitialized value X-Gm-Message-State: ALoCoQlMDiJUM7ORWoSV16kTOIofMX8mLU9jBucfYMDj8SMGVDxiNPkz51MSAGBxpGv8QDcm5qu5 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org From 032d4100467cb1b3e1ed5dc81911aaa704f709dc Mon Sep 17 00:00:00 2001 From: Ammar Haj Hamad Date: Mon, 25 Mar 2013 12:41:35 +0200 Subject: [PATCH] opensm: fix dfsssp uninitialized value in dfsssp_context_create dfsssp_ctx->adj_list_size is not initialized. and might cause segmentation fault when destroying the routing engine. Signed-off-by: Ammar Haj Hamad --- opensm/osm_ucast_dfsssp.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/opensm/osm_ucast_dfsssp.c b/opensm/osm_ucast_dfsssp.c index 803d0e1..01ad03b 100644 --- a/opensm/osm_ucast_dfsssp.c +++ b/opensm/osm_ucast_dfsssp.c @@ -2240,6 +2240,7 @@ static dfsssp_context_t *dfsssp_context_create(osm_opensm_t * p_osm, dfsssp_ctx->routing_type = routing_type; dfsssp_ctx->p_mgr = (osm_ucast_mgr_t *) & (p_osm->sm.ucast_mgr); dfsssp_ctx->adj_list = NULL; + dfsssp_ctx->adj_list_size = 0; dfsssp_ctx->srcdest2vl_table = NULL; } else { OSM_LOG(p_osm->sm.ucast_mgr.p_log, OSM_LOG_ERROR,