[PATCH] fwts_acpica: fix segmentation fault by unlock mutex twice (LP: #1635502)
Colin Ian King
colin.king at canonical.com
Fri Oct 21 07:02:31 UTC 2016
On 21/10/16 04:39, Ivan Hu wrote:
> fix the pthread_mutex_unlock twice cause segment fault
> Test 46 of 192: Test _OFF (Set resource off).
> PASSED: Test 46, \_SB_.PCI0.PEG0.PEGP._OFF returned no values as expected.
> Caught SIGNAL 11 (Segmentation fault), aborting.
> Backtrace:
> 0x00007f09c3fc9dd4 /usr/local/lib/fwts/libfwts.so.1(+0xfdd4)
> 0x00007f09c3a1b4a0 /lib/x86_64-linux-gnu/libc.so.6(+0x354a0)
> 0x00007f09c3363960 /lib/x86_64-linux-gnu/libpthread.so.0(+0x12960)
> 0x00007f09c42196b0 /usr/local/lib/fwts/libfwtsacpica.so.1(fwts_acpica_sem_count_get+0x40)
> 0x000000000041efef fwts()
> 0x000000000041f195 fwts()
> 0x0000000000421210 fwts()
> 0x00007f09c3fcf441 /usr/local/lib/fwts/libfwts.so.1(+0x15441)
> 0x00007f09c3fd0bc3 /usr/local/lib/fwts/libfwts.so.1(fwts_framework_args+0x793)
> 0x000000000040519a fwts()
> 0x00007f09c3a06830 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)
> 0x0000000000406079 fwts()
>
> Signed-off-by: Ivan Hu <ivan.hu at canonical.com>
> ---
> src/acpica/fwts_acpica.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/src/acpica/fwts_acpica.c b/src/acpica/fwts_acpica.c
> index ce21911..f0a44e0 100644
> --- a/src/acpica/fwts_acpica.c
> +++ b/src/acpica/fwts_acpica.c
> @@ -143,7 +143,6 @@ void fwts_acpica_sem_count_get(int *acquired, int *released)
>
> pthread_mutex_lock(&mutex_thread_info);
> threads[i].used = false;
> - pthread_mutex_unlock(&mutex_thread_info);
> }
> pthread_mutex_unlock(&mutex_thread_info);
> }
>
Ooos, that's worrying. Thanks for fixing that thinko of mine. I'll do
the SRU on this fo Xenial and upload a patched and fixed version for
Yakkety and Xenial.
Acked-by: Colin Ian King <colin.king at canonical.com>
More information about the fwts-devel
mailing list