Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1452242
| From | "Tomoki Sekiyama" <tomoki.sekiyama.qu@hitachi.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | RE: [PATCH v2] perf sched: fix wrong conversion of task state |
| Date | 2016-07-29 06:10 +0200 |
| Message-ID | <s07hv-7Y1-7@gated-at.bofh.it> (permalink) |
| References | <rZzIS-1FV-27@gated-at.bofh.it> <rZGKm-6nU-23@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v2] perf sched: fix wrong conversion of task state Tomoki Sekiyama <tomoki.sekiyama.qu@hitachi.com> - 2016-07-27 18:20 +0200
Re: [PATCH v2] perf sched: fix wrong conversion of task state David Ahern <dsahern@gmail.com> - 2016-07-27 19:00 +0200
Re: [PATCH v2] perf sched: fix wrong conversion of task state Masami Hiramatsu <mhiramat@kernel.org> - 2016-07-28 01:50 +0200
RE: [PATCH v2] perf sched: fix wrong conversion of task state "Tomoki Sekiyama" <tomoki.sekiyama.qu@hitachi.com> - 2016-07-29 06:10 +0200
csiph-web