Re: [PATCH] android: binder: Fix a possible data race in binder_alloc_mmap_handler

2018-05-08 Thread Martijn Coenen
On Tue, May 8, 2018 at 2:06 AM, Jia-Ju Bai wrote: > The write operations to "alloc->buffer" are protected by > the lock on line 679 and 730, but the read operation to > this data on line 712 is not protected by the lock. > Thus, there may exist a data race for "alloc->buffer". It's read by the sa

[PATCH] android: binder: Fix a possible data race in binder_alloc_mmap_handler

2018-05-08 Thread Jia-Ju Bai
The write operations to "alloc->buffer" are protected by the lock on line 679 and 730, but the read operation to this data on line 712 is not protected by the lock. Thus, there may exist a data race for "alloc->buffer". To fix this data race, the read operation to "alloc->buffer" should be also p