From: Oleg Nesterov <oleg@redhat.com>
To: Miroslav Benes <mbenes@suse.cz>
Cc: jpoimboe@redhat.com, jeyu@redhat.com, jikos@kernel.org,
pmladek@suse.com, live-patching@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] livepatch: send a fake signal to all blocking tasks
Date: Thu, 18 May 2017 21:52:56 +0200 [thread overview]
Message-ID: <20170518195255.GA2518@redhat.com> (raw)
In-Reply-To: <alpine.LSU.2.20.1705182011410.17317@pobox.suse.cz>
On 05/18, Miroslav Benes wrote:
>
> On Thu, 18 May 2017, Oleg Nesterov wrote:
>
> >
> > exit_to_usermode_loop() calls do_signal(), then klp_update_patch_state().
> > So it won't be cleared here.
>
> Ok, so maybe I misunderstand the code. I see the loop in
> exit_to_usermode_loop() for processing ALLWORK_MASK. There we call
> do_signal(). We go to get_signal(). The infinite loop there is relevant
> for us. We call dequeue_signal(). There, if I am not mistaken
> __dequeue_signal() would return 0
Yes, sorry, I didn't bother to read the code when I looked at your patch
and my memory fooled me.
> If not, we get back to exit_to_usermode_loop() and TIF_PATCH_PENDING is
> cleared. Yes, it is true that TIF_SIGPENDING is still set and we get to
> do_signal() once more. But for the last time.
Yes, slightly sub-optimal but not really wrong and you can swap
do_signal() and klp_update_patch_state().
> If the syscall is restarted, it may be different. I have to think about
> this one. But...
Afaics, there are no problems.
In short. Thanks for correcting me and sorry for noise!
Oleg.
next prev parent reply other threads:[~2017-05-18 19:53 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-18 12:00 [PATCH 0/3] livepatch: Introduce force sysfs attribute Miroslav Benes
2017-05-18 12:00 ` [PATCH 1/3] livepatch: Add " Miroslav Benes
2017-05-18 13:05 ` Libor Pechacek
2017-05-18 13:20 ` Miroslav Benes
2017-05-18 12:00 ` [PATCH 2/3] livepatch: send a fake signal to all blocking tasks Miroslav Benes
2017-05-18 13:10 ` Libor Pechacek
2017-05-18 13:20 ` Miroslav Benes
2017-05-18 16:49 ` Oleg Nesterov
2017-05-18 18:14 ` Miroslav Benes
2017-05-18 19:52 ` Oleg Nesterov [this message]
2017-05-19 7:51 ` Miroslav Benes
2017-05-23 17:30 ` Josh Poimboeuf
2017-05-24 8:31 ` Miroslav Benes
2017-05-18 12:00 ` [PATCH 3/3] livepatch: force transition process to finish Miroslav Benes
2017-05-18 13:16 ` Libor Pechacek
2017-05-18 13:22 ` Miroslav Benes
2017-05-23 17:27 ` Josh Poimboeuf
2017-05-24 8:36 ` Miroslav Benes
2017-05-24 13:06 ` Petr Mladek
2017-05-24 14:15 ` Miroslav Benes
2017-05-24 15:09 ` Petr Mladek
2017-05-25 12:59 ` Miroslav Benes
2017-05-25 16:03 ` Petr Mladek
2017-05-26 17:37 ` Josh Poimboeuf
2017-05-29 12:28 ` Petr Mladek
2017-05-30 12:41 ` Josh Poimboeuf
2017-05-26 17:38 ` Josh Poimboeuf
2017-05-29 9:26 ` Miroslav Benes
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=20170518195255.GA2518@redhat.com \
--to=oleg@redhat.com \
--cc=jeyu@redhat.com \
--cc=jikos@kernel.org \
--cc=jpoimboe@redhat.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.