Re: [PATCH 1/2 v4] perf sched: fix wrong conversion of task state

2016-08-02 Thread Masami Hiramatsu
On Mon, 1 Aug 2016 13:30:25 +0900 Tomoki Sekiyama wrote: > Currently sched_out_state() converts the prev_state u64 bitmask to a char > using the bitmask as an index, which may cause invalid memory access. > This fixes the issue by using the __ffs() returned value as an index. OK, looks good to

Re: [PATCH 1/2 v4] perf sched: fix wrong conversion of task state

2016-08-01 Thread David Ahern
On 7/31/16 10:30 PM, Tomoki Sekiyama wrote: Currently sched_out_state() converts the prev_state u64 bitmask to a char using the bitmask as an index, which may cause invalid memory access. This fixes the issue by using the __ffs() returned value as an index. Signed-off-by: Tomoki Sekiyama Fixes:

[PATCH 1/2 v4] perf sched: fix wrong conversion of task state

2016-07-31 Thread Tomoki Sekiyama
Currently sched_out_state() converts the prev_state u64 bitmask to a char using the bitmask as an index, which may cause invalid memory access. This fixes the issue by using the __ffs() returned value as an index. Signed-off-by: Tomoki Sekiyama Fixes: cdce9d738b91e ("perf sched: Add sched latency