Re: Latest idea to force usage of custom engine

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Frederick wrote:
>      
>      CRYPTO_THREAD_write_lock(rand_meth_lock);
>      CRYPTO_THREAD_write_lock(rand_engine_lock);


This is what's causing the segfault in libpthread.so

I can only imagine that the same thread is trying to re-lock a single-lock 
mutex. So my code should be something like:


int already_locked_meth = is_already_locked(rand_meth_lock);
int already_locked_engine = is_already_locked(rand_engine_lock);

if (!already_locked_meth)
    	CRYPTO_THREAD_write_lock(rand_meth_lock);    	

if (!already_locked_engine)
    	CRYPTO_THREAD_write_lock(rand_engine_lock);


/* DO STUFF */

if (!already_locked_meth)
    	CRYPTO_THREAD_unlock(rand_meth_lock);    	

if (!already_locked_engine)
    	CRYPTO_THREAD_unlock(rand_engine_lock);








[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux