perf: Fix race in arch_perf_write()
authorBarret Rhoden <brho@cs.berkeley.edu>
Tue, 14 Jun 2016 19:58:49 +0000 (15:58 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Fri, 17 Jun 2016 16:17:54 +0000 (12:17 -0400)
commitf7cba7e51d9823100dd31b02c536f28f07a3dad8
treec231a4da302e12aa76df7f927af84c188a177957
parentdb6cfc763152a4c44b05f5d4bc636a2bf62f32f3
perf: Fix race in arch_perf_write()

We could have concurrent readers and writers.  If a writer came in at the
same time as a reader or another writer, they'd race on the response
buffer.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/arch/x86/devarch.c