diff options
author | Pietro Borrello <borrello@diag.uniroma1.it> | 2023-01-28 19:29:17 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-01-31 08:06:08 +0300 |
commit | ffe2a22562444720b05bdfeb999c03e810d84cbb (patch) | |
tree | a569626672c79e0b68e338034c69f8f10e4f85d3 /drivers/net | |
parent | 84115f0e74ea73eccc44842a125f242a02097493 (diff) | |
download | linux-ffe2a22562444720b05bdfeb999c03e810d84cbb.tar.xz |
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: a42055e8d2c3 ("net/tls: Add support for async encryption of records for performance")
Signed-off-by: Pietro 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: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net')
0 files changed, 0 insertions, 0 deletions