Re: [PATCH net-next,v2] net/tls: fix race condition causing kernel panic

2020-05-25 Thread David Miller
From: Vinay Kumar Yadav Date: Sat, 23 May 2020 01:40:31 +0530 > tls_sw_recvmsg() and tls_decrypt_done() can be run concurrently. > // tls_sw_recvmsg() > if (atomic_read(&ctx->decrypt_pending)) > crypto_wait_req(-EINPROGRESS, &ctx->async_wait); > else > rein

Re: [PATCH net-next,v2] net/tls: fix race condition causing kernel panic

2020-05-25 Thread Jakub Kicinski
On Sat, 23 May 2020 01:40:31 +0530 Vinay Kumar Yadav wrote: > tls_sw_recvmsg() and tls_decrypt_done() can be run concurrently. > // tls_sw_recvmsg() > if (atomic_read(&ctx->decrypt_pending)) > crypto_wait_req(-EINPROGRESS, &ctx->async_wait); > else > reinit_c

[PATCH net-next,v2] net/tls: fix race condition causing kernel panic

2020-05-22 Thread Vinay Kumar Yadav
tls_sw_recvmsg() and tls_decrypt_done() can be run concurrently. // tls_sw_recvmsg() if (atomic_read(&ctx->decrypt_pending)) crypto_wait_req(-EINPROGRESS, &ctx->async_wait); else reinit_completion(&ctx->async_wait.completion); //tls_decrypt_done()