From patchwork Wed Sep 11 13:29:29 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 2872601 X-Patchwork-Delegate: hal@mellanox.com Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1113ABF43F for ; Wed, 11 Sep 2013 13:29:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 662E32030D for ; Wed, 11 Sep 2013 13:29:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D977320299 for ; Wed, 11 Sep 2013 13:29:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753547Ab3IKN3e (ORCPT ); Wed, 11 Sep 2013 09:29:34 -0400 Received: from mail-bk0-f44.google.com ([209.85.214.44]:62920 "EHLO mail-bk0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752930Ab3IKN3d (ORCPT ); Wed, 11 Sep 2013 09:29:33 -0400 Received: by mail-bk0-f44.google.com with SMTP id mz10so3621870bkb.31 for ; Wed, 11 Sep 2013 06:29:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:content-type:content-transfer-encoding; bh=7Lys1rkM1wUKcWzuIE7tMESo8Bg5pgqClarkUkEpS7Y=; b=AxfAuZ2zmgkrNcEt6ctM0vi058W6kzCIJPiAaip1KEN8rqNM8nGuMLXHzaHKZ7xjbp MhTZtdpJxNwwp9lU48RRGs95Sb1HL/VztF1ITSMmyciyj3j6Mkxi2TqaYSmHk6H4sN5a 7bz2WDlkX6Omoi8+0EYakMT+WpDP/4E0h/mv6cnNm2MMKtwkfRZGuKjBMsRO6bz86pei PkfSIBTcJO8zUjO38uLW4vtWLKRcHBp+28MpHBBhKxL3PjVCoh/PIzpxQQVeD+VPqf6w 5+Kx2s6jjStza2TXjuqRausv2B9k/DAQYJvHAjATyERwN1Mz45PWgjw9QM5sDsH/Nh2f FY2g== X-Gm-Message-State: ALoCoQliv4kljZys2HBS+hA8hQcJbk+KjJWFiXVM6I+KWhWuwIxJFn/jNBgSznzXOxkge6JW0Abm X-Received: by 10.205.26.67 with SMTP id rl3mr1536050bkb.41.1378906171609; Wed, 11 Sep 2013 06:29:31 -0700 (PDT) Received: from [192.168.1.102] (c-98-229-118-119.hsd1.ma.comcast.net. [98.229.118.119]) by mx.google.com with ESMTPSA id pn6sm7531553bkb.14.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 11 Sep 2013 06:29:31 -0700 (PDT) Message-ID: <52307039.8060209@dev.mellanox.co.il> Date: Wed, 11 Sep 2013 09:29:29 -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: Vladimir Koushnir Subject: [PATCH opensm] Use after free in osm_prtn_delete Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Vladimir Koushnir Signed-off-by: Vladimir Koushnir Signed-off-by: Hal Rosenstock --- opensm/osm_prtn.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/opensm/osm_prtn.c b/opensm/osm_prtn.c index ca7703d..24a1fe3 100644 --- a/opensm/osm_prtn.c +++ b/opensm/osm_prtn.c @@ -105,13 +105,13 @@ void osm_prtn_delete(IN osm_subn_t * p_subn, IN OUT osm_prtn_t ** pp_prtn) /* osm_mgrp_cleanup will not delete * "well_known" groups */ p->mgrps[i]->well_known = FALSE; - osm_mgrp_cleanup(p_subn, p->mgrps[i]); OSM_LOG(&p_subn->p_osm->log, OSM_LOG_DEBUG, "removing mgroup %s from partition (0x%x)\n", inet_ntop(AF_INET6, p->mgrps[i]->mcmember_rec.mgid.raw, gid_str, sizeof gid_str), cl_hton16(p->pkey)); + osm_mgrp_cleanup(p_subn, p->mgrps[i]); } free(p->mgrps);