From patchwork Thu Feb 11 19:41:15 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ameya Palande X-Patchwork-Id: 78802 X-Patchwork-Delegate: omar.ramirez@ti.com 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 o1BJhsCc013785 for ; Thu, 11 Feb 2010 19:43:54 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756788Ab0BKTnx (ORCPT ); Thu, 11 Feb 2010 14:43:53 -0500 Received: from smtp.nokia.com ([192.100.122.230]:25318 "EHLO mgw-mx03.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756405Ab0BKTnw convert rfc822-to-8bit (ORCPT ); Thu, 11 Feb 2010 14:43:52 -0500 Received: from vaebh105.NOE.Nokia.com (vaebh105.europe.nokia.com [10.160.244.31]) by mgw-mx03.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o1BJhf4N031341; Thu, 11 Feb 2010 21:43:44 +0200 Received: from vaebh102.NOE.Nokia.com ([10.160.244.23]) by vaebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 11 Feb 2010 21:43:41 +0200 Received: from smtp.mgd.nokia.com ([65.54.30.6]) by vaebh102.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Thu, 11 Feb 2010 21:43:36 +0200 Received: from NOK-EUMSG-03.mgdnok.nokia.com ([65.54.30.88]) by nok-am1mhub-02.mgdnok.nokia.com ([65.54.30.6]) with mapi; Thu, 11 Feb 2010 20:43:36 +0100 From: To: , CC: , Date: Thu, 11 Feb 2010 20:41:15 +0100 Subject: RE: [PATCH v3] DSPBRIDGE: Fix to avoid possible recursive locking Thread-Topic: [PATCH v3] DSPBRIDGE: Fix to avoid possible recursive locking Thread-Index: AcqrT4SpsjBncyl2SQu/Q6oW9v+hWgAAqe/6 Message-ID: References: <1265916121-5601-1-git-send-email-deepak.chitriki@ti.com> In-Reply-To: <1265916121-5601-1-git-send-email-deepak.chitriki@ti.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 X-OriginalArrivalTime: 11 Feb 2010 19:43:36.0524 (UTC) FILETIME=[808358C0:01CAAB52] X-Nokia-AV: Clean Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@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]); Thu, 11 Feb 2010 19:43:54 +0000 (UTC) diff --git a/drivers/dsp/bridge/wmd/msg_sm.c b/drivers/dsp/bridge/wmd/msg_sm.c index 7de3705..7414113 100644 --- a/drivers/dsp/bridge/wmd/msg_sm.c +++ b/drivers/dsp/bridge/wmd/msg_sm.c @@ -295,9 +295,8 @@ DSP_STATUS WMD_MSG_Get(struct MSG_QUEUE *hMsgQueue, (struct list_head *)pMsgFrame); if (LST_IsEmpty(hMsgQueue->msgUsedList)) SYNC_ResetEvent(hMsgQueue->hSyncEvent); - else { + else SYNC_SetEvent(hMsgQueue->hSyncEvent); - } fGotMsg = true; } @@ -345,9 +344,9 @@ DSP_STATUS WMD_MSG_Get(struct MSG_QUEUE *hMsgQueue, } hMsgQueue->refCount--; /* Reset the event if there are still queued messages */ - if (!LST_IsEmpty(hMsgQueue->msgUsedList)) { + if (!LST_IsEmpty(hMsgQueue->msgUsedList)) SYNC_SetEvent(hMsgQueue->hSyncEvent); - } + /* Exit critical section */ (void)SYNC_LeaveCS(hMsgMgr->hSyncCS); }