diff options
author | Harshvardhan Jha <harshvardhan.jha@oracle.com> | 2021-07-25 23:23:55 +0530 |
---|---|---|
committer | Sasha Levin <sashal@kernel.org> | 2021-08-26 08:35:35 -0400 |
commit | 505884a0c7a1c44e66690b975601220eace0868c (patch) | |
tree | b50f599f024d32bcb91e435d9f70b70c6a1d984c /net/xfrm/xfrm_ipcomp.c | |
parent | f1c0533fae5956d49f232255799b725c4b810abd (diff) | |
download | kernel_replicant_linux-505884a0c7a1c44e66690b975601220eace0868c.tar.gz kernel_replicant_linux-505884a0c7a1c44e66690b975601220eace0868c.tar.bz2 kernel_replicant_linux-505884a0c7a1c44e66690b975601220eace0868c.zip |
net: xfrm: Fix end of loop tests for list_for_each_entry
[ Upstream commit 480e93e12aa04d857f7cc2e6fcec181c0d690404 ]
The list_for_each_entry() iterator, "pos" in this code, can never be
NULL so the warning will never be printed.
Signed-off-by: Harshvardhan Jha <harshvardhan.jha@oracle.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net/xfrm/xfrm_ipcomp.c')
-rw-r--r-- | net/xfrm/xfrm_ipcomp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/xfrm/xfrm_ipcomp.c b/net/xfrm/xfrm_ipcomp.c index 4d422447aadc..0814320472f1 100644 --- a/net/xfrm/xfrm_ipcomp.c +++ b/net/xfrm/xfrm_ipcomp.c @@ -250,7 +250,7 @@ static void ipcomp_free_tfms(struct crypto_comp * __percpu *tfms) break; } - WARN_ON(!pos); + WARN_ON(list_entry_is_head(pos, &ipcomp_tfms_list, list)); if (--pos->users) return; |