On Fri, Jan 27, 2017 at 08:27:11AM +0200, Jarkko Sakkinen wrote:
On Thu, Jan 26, 2017 at 09:16:35AM -0800, Sean Christopherson wrote:
> Use kref_get_unless_zero() when attempting to add an enclave to an
> existing sgx_tgid_ctx to ensure the ctx is not about to be released.
> A process may destroy its last enclave while simultaneously creating
> a new enclave, resulting in the ctx's refcnt decrementing to zero as
> the new enclave is querying sgx_tgid_ctx_list.
> Signed-off-by: Sean Christopherson <sean.j.christopherson(a)intel.com>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen(a)linux.intel.com>
I just noticed that I hadn't applied this. Now it's pushed. Sorry