From patchwork Wed Apr 10 10:36:07 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 2420411 X-Patchwork-Delegate: hal@mellanox.com Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id E6A0C3FD8C for ; Wed, 10 Apr 2013 10:36:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936214Ab3DJKgO (ORCPT ); Wed, 10 Apr 2013 06:36:14 -0400 Received: from mail-ea0-f182.google.com ([209.85.215.182]:41616 "EHLO mail-ea0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936164Ab3DJKgN (ORCPT ); Wed, 10 Apr 2013 06:36:13 -0400 Received: by mail-ea0-f182.google.com with SMTP id q15so152105ead.13 for ; Wed, 10 Apr 2013 03:36:11 -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:subject :content-type:content-transfer-encoding:x-gm-message-state; bh=tJN22Pp5aAy/nnU0/f5zL1gQyq7y9rAgc6UWBCBn5v8=; b=D3qlBxNf6fJhSmUHYoKpTgmrIxZji/cIAj30cys74Q5hfP3rCJ6NKE9+wEcA5mO3jz boA3QJwMoyoR3txNBgCJSilU7g45ijnNY22ax0mWVMpT6ilmYKUjyd7/6SypBIG+Pkun oMx55oGafzWXY5XqzndhYGdjIusJpqs6MyQU0WNuyiGHX0Yyx/8PCn7KyZhSFfqwi9N2 1Nb2jxqwDiEvOFbKZvQy0SC7zAoix9nLrySSDz88YOCvgEAiy0VNpAE6Z9OiV4+rlQXI UHlsgqAcN+PBax/zJ1S1NFA9kPK9fpgdOPbmD0wjtwSFB2gNOb1RFYqVenN6uSOqGPy8 3gaw== X-Received: by 10.14.110.198 with SMTP id u46mr3787871eeg.41.1365590171301; Wed, 10 Apr 2013 03:36:11 -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 a41sm8671951eei.4.2013.04.10.03.36.09 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 10 Apr 2013 03:36:10 -0700 (PDT) Message-ID: <51654097.1080703@dev.mellanox.co.il> Date: Wed, 10 Apr 2013 06:36:07 -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)" Subject: [PATCH opensm] osm_sa_mad_ctrl.c: Drop incoming SA queries when shutting down X-Gm-Message-State: ALoCoQluyxpcjr+icMFumfnmqzVBTekBDR2qGiradG1U12joAhTu3o27Xfv5p3D3sddT3IHx3jqK Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Signed-off-by: Hal Rosenstock --- -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/opensm/osm_sa_mad_ctrl.c b/opensm/osm_sa_mad_ctrl.c index 86c8fda..902803e 100644 --- a/opensm/osm_sa_mad_ctrl.c +++ b/opensm/osm_sa_mad_ctrl.c @@ -54,6 +54,7 @@ #include #include #include +#include /****f* opensm: SA/sa_mad_ctrl_disp_done_callback * NAME @@ -357,7 +358,11 @@ static void sa_mad_ctrl_rcv_callback(IN osm_madw_t * p_madw, IN void *context, #endif case IB_MAD_METHOD_SET: case IB_MAD_METHOD_DELETE: - sa_mad_ctrl_process(p_ctrl, p_madw); + /* if we are closing down simply do nothing */ + if (osm_exit_flag) + osm_mad_pool_put(p_ctrl->p_mad_pool, p_madw); + else + sa_mad_ctrl_process(p_ctrl, p_madw); break; default: