]> git.baikalelectronics.ru Git - kernel.git/commit
net/tls: free record only on encryption error
authorVadim Fedorenko <vfedorenko@novek.ru>
Wed, 20 May 2020 08:41:44 +0000 (11:41 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 22 May 2020 00:20:06 +0000 (17:20 -0700)
commit7a3af3f11fa902fdf7e1db7b017f8fd96ddcb1c0
tree57d5ed24720738b99f0af664b99cb6648bbc2aa9
parent773e7318439b64ffe71162ff657671528fbb747a
net/tls: free record only on encryption error

We cannot free record on any transient error because it leads to
losing previos data. Check socket error to know whether record must
be freed or not.

Fixes: c7e51a9c5c83 ("net/tls: free the record on encryption error")
Signed-off-by: Vadim Fedorenko <vfedorenko@novek.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tls/tls_sw.c