From: <yhb@ruijie.com.cn>
To: jiwei.sun@windriver.com
Cc: linux-mips@linux-mips.org
Subject: Re: [PATCH] MIPS: reset all task's asid to 0 after asid_cache(cpu) overflows
Date: Mon, 6 Mar 2017 02:44:27 +0000 [thread overview]
Message-ID: <80B78A8B8FEE6145A87579E8435D78C307943B56@FZEX3.ruijie.com.cn> (raw)
Message-ID: <20170306024427.pEzKTqaKIqy9ZuZbbsiEJnayM2QNQOIU9tOIayNJv6g@z> (raw)
+ if (!asid) { /* fix version if needed */
+ struct task_struct *p;
+
+ for_each_process(p) {
+ if ((p->mm))
+ cpu_context(cpu, p->mm) = 0;
+ }
It is not safe. When the processor is executing these codes, another processor is freeing task_struct, setting p->mm to NULL, and freeing mm_struct.
I committed a patch to solve this problem.Please see https://patchwork.linux-mips.org/patch/13789/.
next reply other threads:[~2017-03-06 2:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-06 2:44 yhb [this message]
2017-03-06 2:44 ` [PATCH] MIPS: reset all task's asid to 0 after asid_cache(cpu) overflows yhb
2017-03-06 8:00 ` jsun4
2017-03-06 8:00 ` jsun4
-- strict thread matches above, loose matches on Subject: below --
2017-03-05 3:24 Jiwei Sun
2017-03-05 3:24 ` Jiwei Sun
2017-03-05 9:38 ` Sergei Shtylyov
2017-03-06 7:21 ` jsun4
2017-03-06 7:21 ` jsun4
2017-03-06 8:34 ` Sergei Shtylyov
2017-03-07 12:06 ` Jiwei Sun
2017-03-07 12:06 ` Jiwei Sun
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=80B78A8B8FEE6145A87579E8435D78C307943B56@FZEX3.ruijie.com.cn \
--to=yhb@ruijie.com.cn \
--cc=jiwei.sun@windriver.com \
--cc=linux-mips@linux-mips.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).