mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Miroslav Benes <mbenes@suse.cz>
Cc: jeyu@kernel.org, jikos@kernel.org, pmladek@suse.com,
	jbaron@akamai.com, live-patching@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] livepatch: add locking to force and signal functions
Date: Thu, 11 Jan 2018 09:09:15 -0600	[thread overview]
Message-ID: <20180111150915.k3smqm3j6bfesup3@treble> (raw)
In-Reply-To: <20171221134043.32543-1-mbenes@suse.cz>

On Thu, Dec 21, 2017 at 02:40:43PM +0100, Miroslav Benes wrote:
> klp_send_signals() and klp_force_transition() do not acquire klp_mutex,
> because it seemed to be superfluous. A potential race in
> klp_send_signals() was harmless and there was nothing in
> klp_force_transition() which needed to be synchronized. That changed
> with the addition of klp_forced variable during the review process.
> 
> There is a small window now, when klp_complete_transition() does not see
> klp_forced set to true while all tasks have been already transitioned to
> the target state. module_put() is called and the module can be removed.
> 
> Acquire klp_mutex in sysfs callback to prevent it. Do the same for the
> signal sending just to be sure. There is no real downside to that.
> 
> Reported-by: Jason Baron <jbaron@akamai.com>
> Signed-off-by: Miroslav Benes <mbenes@suse.cz>

Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>

-- 
Josh

  parent reply	other threads:[~2018-01-11 15:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-21 13:40 Miroslav Benes
2017-12-21 15:20 ` Petr Mladek
2018-01-11 15:09 ` Josh Poimboeuf [this message]
2018-01-11 16:37 ` Jiri Kosina

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=20180111150915.k3smqm3j6bfesup3@treble \
    --to=jpoimboe@redhat.com \
    --cc=jbaron@akamai.com \
    --cc=jeyu@kernel.org \
    --cc=jikos@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=live-patching@vger.kernel.org \
    --cc=mbenes@suse.cz \
    --cc=pmladek@suse.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

all inboxes | Powered by JetHome®