From patchwork Wed Mar 26 18:50:50 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 3894871 X-Patchwork-Delegate: hal@mellanox.com Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id AA7A99F2B6 for ; Wed, 26 Mar 2014 18:50:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B2AF620221 for ; Wed, 26 Mar 2014 18:50:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DE28220155 for ; Wed, 26 Mar 2014 18:50:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754217AbaCZSu5 (ORCPT ); Wed, 26 Mar 2014 14:50:57 -0400 Received: from mail-ee0-f53.google.com ([74.125.83.53]:45732 "EHLO mail-ee0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751580AbaCZSu4 (ORCPT ); Wed, 26 Mar 2014 14:50:56 -0400 Received: by mail-ee0-f53.google.com with SMTP id b57so1995089eek.40 for ; Wed, 26 Mar 2014 11:50:55 -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=dCL6UT8CZ7mBpBCrUfqSvYt1UxuWdXuS8NLtHr/lUn8=; b=OWM0r1RPJcrficQK1wc+MAQ2avGdHtAbvUnZ/tD9JtkL5X3ljTDCMBsHWhgg4QDTvT ltyJWHE2Dnsy6blyYly9WkgjAoC2SNpM1O8mhDTFEZrf2zIjrAMSx8LsXxzfIJGQ+kPE 6Ux4q906lNJ8U2XalxXqXjBe4jQEXnpg2rCLIWxIENLZxM4EquvCpHV9EkwHjs4FufGV wiqkv4/bVzCFkIFC8hLwPfl/pjDrUlvFoa4/XYSeiFXooB1xRsvunzqngs3pZSgXOE9R HoUy3Svn5B4ksIw3ZdBEcOQ7vukCQolwwTcgzChyWMHbjeECKw9SKzRF8ZlWk+Zuf+ly lftA== X-Gm-Message-State: ALoCoQlPwRW8EtTCiF/Dzc43Jmbxxiv0GK/j2qurLswmvdgwujhMaZj1Mcin3A3rzl9UkKei57S/ X-Received: by 10.14.246.1 with SMTP id p1mr12745555eer.20.1395859855596; Wed, 26 Mar 2014 11:50:55 -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 e42sm48884801eev.32.2014.03.26.11.50.53 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 26 Mar 2014 11:50:54 -0700 (PDT) Message-ID: <5333218A.3050108@dev.mellanox.co.il> Date: Wed, 26 Mar 2014 14:50:50 -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: Alex Netes Subject: [PATCH opensm 2/2] osm_sa_service_record.c: Improve locking 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.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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: Alex Netes Date: Tue, 25 Mar 2014 12:01:56 +0200 Read lock should be sufficient when treating GET method. Signed-off-by: Alex Netes Signed-off-by: Hal Rosenstock --- opensm/osm_sa_service_record.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) -- 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_service_record.c b/opensm/osm_sa_service_record.c index 61c5892..cce0ad5 100644 --- a/opensm/osm_sa_service_record.c +++ b/opensm/osm_sa_service_record.c @@ -454,7 +454,7 @@ static void sr_rcv_process_get_method(osm_sa_t * sa, IN osm_madw_t * p_madw) CL_ASSERT(p_madw); /* Grab the lock */ - cl_plock_excl_acquire(sa->p_lock); + cl_plock_acquire(sa->p_lock); /* update the requester physical port */ p_req_physp = osm_get_physp_by_mad_addr(sa->p_log, sa->p_subn,