mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Tomoki Sekiyama" <tomoki.sekiyama.qu@hitachi.com>
To: "'Masami Hiramatsu'" <mhiramat@kernel.org>
Cc: linux-kernel@vger.kernel.org,
	ltc-kernel@rdgml.intra.hitachi.co.jp,
	"森谷真寿美 / MORITANI,MASUMI" <masumi.moritani.ju@hitachi.com>,
	"Jiri Olsa" <jolsa@kernel.org>, "David Ahern" <dsahern@gmail.com>,
	"Namhyung Kim" <namhyung@kernel.org>,
	"Peter Zijlstra" <a.p.zijlstra@chello.nl>
Subject: RE: [PATCH v2] perf sched: fix wrong conversion of task state
Date: Fri, 29 Jul 2016 13:00:34 +0900	[thread overview]
Message-ID: <000001d1e94d$c24dfea0$46e9fbe0$@hitachi.com> (raw)
In-Reply-To: <20160728084306.9b2ea62c38c34760bf86d6db@kernel.org>

Hi Hiramatsu-san,

On 2016/7/28, 2016 8:43, Masami Hiramatsu wrote:
> Hmm, this includes several fixes and enhancements.
> 1. Use first bit of the state instead of state itself (critical bug to
avoid crash?)
> 2. Check the range of the array and return '?' if out (minor bug, it can
access data area)
> 3. Fix TASK_STATE_TO_CHAR_STR to swap X and Z.
> 4. Add new 'N+' to TASK_STATE_TO_CHAR_STR. (how about 'n'?)
> 5. Treat a preempted task as THREAD_WAIT_CPU.
>
> so IMHO, it is better to split this patch into atleast 2, #1 and #2
(critical bugfix),
> #3, #4, and #5 (minor update).

This time I will fix only the invalid array access and
adapting to the current kernel TASK_STATE, and leave the
preempted task handling for later follow-up.

 [..]
>> @@ -897,9 +898,10 @@ static int thread_atoms_insert(struct perf_sched
*sched, struct thread *thread)
>> +	return bit < sizeof(str) - 1 ? str[bit] : '?';
>
> You'd better use ARRAY_SIZE(str) instead of sizeof() for array here.

OK, will change this to use ARRAY_SIZE on the next update.

Thanks,
Tomoki Sekiyama

      reply	other threads:[~2016-07-29  4:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-27 16:07 Tomoki Sekiyama
2016-07-27 16:52 ` David Ahern
2016-07-27 23:43 ` Masami Hiramatsu
2016-07-29  4:00   ` Tomoki Sekiyama [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='000001d1e94d$c24dfea0$46e9fbe0$@hitachi.com' \
    --to=tomoki.sekiyama.qu@hitachi.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=dsahern@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ltc-kernel@rdgml.intra.hitachi.co.jp \
    --cc=masumi.moritani.ju@hitachi.com \
    --cc=mhiramat@kernel.org \
    --cc=namhyung@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

Powered by JetHome