platform: goldfish: pipe: Prevent memory corruption from several threads writing...
authorRoman Kiryanov <rkir@google.com>
Fri, 14 Sep 2018 17:51:03 +0000 (10:51 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 25 Sep 2018 18:25:42 +0000 (20:25 +0200)
commit48a2d422b508e707f477f9160c795f70c5c20026
treeb90cb12a5dd626e4ff1b33317ac6a3854fbfa2a7
parent9b9a4a3f140050797a881dec8f8c5ebb33a16ac0
platform: goldfish: pipe: Prevent memory corruption from several threads writing to the same variable

Move the "pages" buffer into "struct goldfish_pipe". Since we are
locking the mutex on the pipe in transfer_max_buffers, other threads
willnot be able to write into it, but other pipe instances could be
served because they have its own buffer.

Signed-off-by: Roman Kiryanov <rkir@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/platform/goldfish/goldfish_pipe.c