From: Roman Penyaev <roman.penyaev@profitbricks.com>
To: Oleg Nesterov <oleg@redhat.com>
Cc: Andy Lutomirski <luto@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Tejun Heo <tj@kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 1/1] workqueue: ignore dead tasks in a workqueue sleep hook
Date: Wed, 26 Oct 2016 17:43:55 +0200 [thread overview]
Message-ID: <CAJrWOzA-7fDv3shn1iC9puWSruYc--x0mKdqzyRESY6MBj+GsQ@mail.gmail.com> (raw)
In-Reply-To: <20161026141834.GB6893@redhat.com>
On Wed, Oct 26, 2016 at 4:18 PM, Oleg Nesterov <oleg@redhat.com> wrote:
> On 10/25, Roman Pen wrote:
>>
>> void wq_worker_waking_up(struct task_struct *task, int cpu)
>> {
>> - struct worker *worker = kthread_data(task);
>> + struct worker *worker;
>> +
>> + if (task->flags & PF_EXITING) {
>> + /*
>> + * Careful here, t->vfork_done is zeroed out for
>> + * almost dead tasks, do not touch kthread_data().
>> + */
>> + return;
>> + }
>> +
>> + worker = kthread_data(task);
>>
>> if (!(worker->flags & WORKER_NOT_RUNNING)) {
>> WARN_ON_ONCE(worker->pool->cpu != cpu);
>> @@ -875,9 +885,19 @@ void wq_worker_waking_up(struct task_struct *task, int cpu)
>> */
>> struct task_struct *wq_worker_sleeping(struct task_struct *task)
>> {
>> - struct worker *worker = kthread_data(task), *to_wakeup = NULL;
>> + struct worker *worker, *to_wakeup = NULL;
>> struct worker_pool *pool;
>>
>> + if (task->flags & PF_EXITING) {
>> + /*
>> + * Careful here, t->vfork_done is zeroed out for
>> + * almost dead tasks, do not touch kthread_data().
>> + */
>> + return NULL;
>> + }
>> +
>> + worker = kthread_data(task);
>> +
>
> Please see the patch I send a minute ago. With that patch we do not need
> this fix, kthread_data() no longer uses ->vfork_done.
Perfect. Thanks. Oleg, could you please add me to CC when you finally send
a patch.
--
Roman
prev parent reply other threads:[~2016-10-26 15:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-25 18:27 [PATCH v4 1/1] workqueue: ignore dead tasks in a workqueue sleep hook Roman Pen
2016-10-26 14:18 ` Oleg Nesterov
2016-10-26 15:43 ` Roman Penyaev [this message]
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=CAJrWOzA-7fDv3shn1iC9puWSruYc--x0mKdqzyRESY6MBj+GsQ@mail.gmail.com \
--to=roman.penyaev@profitbricks.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=tj@kernel.org \
/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).