From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756550AbdKNUb2 (ORCPT ); Tue, 14 Nov 2017 15:31:28 -0500 Received: from mga06.intel.com ([134.134.136.31]:5363 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753337AbdKNUbU (ORCPT ); Tue, 14 Nov 2017 15:31:20 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,396,1505804400"; d="scan'208";a="4955223" Date: Tue, 14 Nov 2017 22:31:15 +0200 From: Jarkko Sakkinen To: Sean Christopherson Cc: intel-sgx-kernel-dev@lists.01.org, linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org Subject: Re: [intel-sgx-kernel-dev] [PATCH v5 10/11] intel_sgx: glue code for in-kernel LE Message-ID: <20171114203115.cuwsgwxzadqn7d4u@linux.intel.com> References: <20171113194528.28557-1-jarkko.sakkinen@linux.intel.com> <20171113194528.28557-11-jarkko.sakkinen@linux.intel.com> <1510683403.11044.2.camel@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1510683403.11044.2.camel@intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 14, 2017 at 10:16:43AM -0800, Sean Christopherson wrote: > This semaphore approach is broken due to the LE process using an anon inode for > /dev/sgx, which results in sgx_release being called without an accompanying call > to sgx_open.  This causes deadlocks due to a semaphore underrun. > > https://lists.01.org/pipermail/intel-sgx-kernel-dev/2017-November/000901.html Thank you for catching this. I can only say that I forgot to fix it it for v5. It will be refined for v6. /Jarkko