]> git.baikalelectronics.ru Git - kernel.git/commit
net: tls: Fix deadlock in free_resources tx
authorDave Watson <davejwatson@fb.com>
Sun, 27 Jan 2019 00:59:03 +0000 (00:59 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 29 Jan 2019 07:07:08 +0000 (23:07 -0800)
commitd908c27c14db8852e6a4dcbe14470ee763d1137e
tree82e20cb9fb7643d6c8f74851ebcecaa98c1cc5d9
parent60e3609bcc261c942e2a6681fbf84202c5a0ebfb
net: tls: Fix deadlock in free_resources tx

If there are outstanding async tx requests (when crypto returns EINPROGRESS),
there is a potential deadlock: the tx work acquires the lock, while we
cancel_delayed_work_sync() while holding the lock.  Drop the lock while waiting
for the work to complete.

Fixes: 4e09428b5ad71 ("Add support for async encryption of records...")
Signed-off-by: Dave Watson <davejwatson@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tls/tls_sw.c