Skip to content
Commit ffe2a225 authored by Pietro Borrello's avatar Pietro Borrello Committed by Jakub Kicinski
Browse files

net/tls: tls_is_tx_ready() checked list_entry

tls_is_tx_ready() checks that list_first_entry() does not return NULL.
This condition can never happen. For empty lists, list_first_entry()
returns the list_entry() of the head, which is a type confusion.
Use list_first_entry_or_null() which returns NULL in case of empty
lists.

Fixes: a42055e8

 ("net/tls: Add support for async encryption of records for performance")
Signed-off-by: default avatarPietro Borrello <borrello@diag.uniroma1.it>
Link: https://lore.kernel.org/r/20230128-list-entry-null-check-tls-v1-1-525bbfe6f0d0@diag.uniroma1.it


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 84115f0e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment