diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2016-02-09 15:57:11 +0000 |
---|---|---|
committer | Riku Voipio <riku.voipio@linaro.org> | 2016-02-23 21:25:09 +0200 |
commit | b6e17875f2e4d1ebfd45bcb0eed04c3157e86a84 (patch) | |
tree | f88b68b7f8d1c4bddac4547cd2b2f2b078265343 /audio/wavaudio.c | |
parent | de3f1b98410e0d5b406a0df3a48547b559d18602 (diff) |
linux-user: Don't assert if guest tries shmdt(0)
Our implementation of shmat() and shmdt() for linux-user was
using "zero guest address" as its marker for "entry in the
shm_regions[] array is not in use". This meant that if the
guest did a shmdt(0) we would match on an unused array entry
and call page_set_flags() with both start and end addresses zero,
which causes an assertion failure.
Use an explicit in_use flag to manage the shm_regions[] array,
so that we avoid this problem.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reported-by: Pavel Shamis <pasharesearch@gmail.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Diffstat (limited to 'audio/wavaudio.c')
0 files changed, 0 insertions, 0 deletions