linux-sgx.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
To: Sean Christopherson <sean.j.christopherson@intel.com>
Cc: linux-sgx@vger.kernel.org
Subject: Re: [PATCH] x86/sgx: Fix deadlock and race conditions between fork() and EPC reclaim
Date: Wed, 18 Mar 2020 17:51:45 +0200	[thread overview]
Message-ID: <20200318155145.GB37726@linux.intel.com> (raw)
In-Reply-To: <20200318155043.GA37726@linux.intel.com>

On Wed, Mar 18, 2020 at 05:50:47PM +0200, Jarkko Sakkinen wrote:
> > > +	/*
> > > +	 * DO NOT call synchronize_srcu()!  When this is called via dup_mmap(),
> > > +	 * mmap_sem is held for write in both the old mm and new mm, and the
> > > +	 * reclaimer may be holding srcu for read while waiting on down_read()
> > > +	 * for the old mm's mmap_sem, i.e. synchronizing will deadlock.
> > > +	 * Incrementing the list version ensures readers that must not race
> > > +	 * with a mm being added will see the updated list.
> > > +	 */
> 
> For this comment, please completely remove it. We either call something
> or do not call it. We do !call anything.

Was meaning to say that we do not !call anything.

/Jarkko

  reply	other threads:[~2020-03-18 15:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-17  5:15 [PATCH] x86/sgx: Fix deadlock and race conditions between fork() and EPC reclaim Sean Christopherson
2020-03-18 15:39 ` Jarkko Sakkinen
2020-03-18 15:50   ` Jarkko Sakkinen
2020-03-18 15:51     ` Jarkko Sakkinen [this message]
2020-03-18 16:03     ` Sean Christopherson
2020-03-18 19:40       ` Jarkko Sakkinen
2020-03-18 19:41         ` Jarkko Sakkinen
2020-03-18 20:07           ` Sean Christopherson
2020-03-19 14:15             ` Jarkko Sakkinen
2020-03-18 21:30           ` Jarkko Sakkinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200318155145.GB37726@linux.intel.com \
    --to=jarkko.sakkinen@linux.intel.com \
    --cc=linux-sgx@vger.kernel.org \
    --cc=sean.j.christopherson@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).