netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH ipsec-next] xfrm: Initialise dir in xfrm_hash_rebuild()
@ 2024-08-30 17:01 Simon Horman
  2024-08-31  8:25 ` Simon Horman
  0 siblings, 1 reply; 2+ messages in thread
From: Simon Horman @ 2024-08-30 17:01 UTC (permalink / raw)
  To: Steffen Klassert, Herbert Xu
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Florian Westphal, netdev, Naresh Kamboju

The cited commit removed the initialisation of dir in one place too
many: it is still used within the loop this patch updates.

Compile tested only.

Fixes: 08c2182cf0b4 ("xfrm: policy: use recently added helper in more places")
Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Closes: https://lore.kernel.org/netdev/CA+G9fYtemFfuhc7=eNyP3TezM9Euc8sFtHe4GDR4Z9XdHzXSJA@mail.gmail.com/
Signed-off-by: Simon Horman <horms@kernel.org>
---
 net/xfrm/xfrm_policy.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index 6336baa8a93c..02eb4bd0fde6 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -1283,6 +1283,7 @@ static void xfrm_hash_rebuild(struct work_struct *work)
 		if (xfrm_policy_is_dead_or_sk(policy))
 			continue;
 
+		dir = xfrm_policy_id2dir(policy->index);
 		if ((dir & XFRM_POLICY_MASK) == XFRM_POLICY_OUT) {
 			if (policy->family == AF_INET) {
 				dbits = rbits4;


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-08-31  8:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-30 17:01 [PATCH ipsec-next] xfrm: Initialise dir in xfrm_hash_rebuild() Simon Horman
2024-08-31  8:25 ` Simon Horman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).