diff options
| author | Oleg Nesterov <[email protected]> | 2014-09-02 17:57:27 +0000 |
|---|---|---|
| committer | H. Peter Anvin <[email protected]> | 2014-09-02 21:51:16 +0000 |
| commit | 5e23fee23ea10730c752edce1777e6b7e727290f (patch) | |
| tree | 61f1a52fe56b38602b00e8b709f0a456b5ccfaef /tools/perf/scripts/python/check-perf-trace.py | |
| parent | x86, fpu: copy_process: Avoid fpu_alloc/copy if !used_math() (diff) | |
| download | kernel-5e23fee23ea10730c752edce1777e6b7e727290f.tar.gz kernel-5e23fee23ea10730c752edce1777e6b7e727290f.zip | |
x86, fpu: copy_process: Sanitize fpu->last_cpu initialization
Cosmetic, but imho memset(&dst->thread.fpu, 0) is not good simply
because it hides the (important) usage of ->has_fpu/etc from grep.
Change this code to initialize the members explicitly.
And note that ->last_cpu = 0 looks simply wrong, this can confuse
fpu_lazy_restore() if per_cpu(fpu_owner_task, 0) has already exited
and copy_process() re-allocated the same task_struct. Fortunately
this is not actually possible because child->fpu_counter == 0 and
thus fpu_lazy_restore() will not be called, but still this is not
clean/robust.
Signed-off-by: Oleg Nesterov <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Reviewed-by: Suresh Siddha <[email protected]>
Signed-off-by: H. Peter Anvin <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/check-perf-trace.py')
0 files changed, 0 insertions, 0 deletions
