[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v8 1/1] audio/jack: fix use after free segfault
From: |
Paolo Bonzini |
Subject: |
Re: [PATCH v8 1/1] audio/jack: fix use after free segfault |
Date: |
Fri, 21 Aug 2020 19:47:19 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 |
On 21/08/20 19:34, Christian Schoenebeck wrote:
>>
>> static void qjack_fini_out(HWVoiceOut *hw)
>> {
>> QJackOut *jo = (QJackOut *)hw;
>> qjack_client_fini(&jo->c);
>> +
>> + qemu_bh_delete(jo->c.shutdown_bh);
> Paolo wrapped that qemu_bh_delete() call inside the lock as well. So I guess
> it makes a difference for the BH API?
It is not a problem as long as qjack_client_fini is idempotent.
>> + qemu_mutex_destroy(&jo->c.shutdown_lock);
>> }
>
> Hmmm, is this qemu_mutex_destroy() safe at this point?
Perhaps make the mutex global and not destroy it at all.
Paolo