* [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
* Re: [PATCH ipsec-next] xfrm: Initialise dir in xfrm_hash_rebuild()
2024-08-30 17:01 [PATCH ipsec-next] xfrm: Initialise dir in xfrm_hash_rebuild() Simon Horman
@ 2024-08-31 8:25 ` Simon Horman
0 siblings, 0 replies; 2+ messages in thread
From: Simon Horman @ 2024-08-31 8:25 UTC (permalink / raw)
To: Steffen Klassert, Herbert Xu
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Florian Westphal, netdev, Naresh Kamboju, Nathan Chancellor
+ Nathan
On Fri, Aug 30, 2024 at 06:01:50PM +0100, Simon Horman wrote:
> 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>
Nathan advises me that this fix is incomplete and
that he has sent a complete fix here:
https://lore.kernel.org/all/20240829-xfrm-restore-dir-assign-xfrm_hash_rebuild-v2-1-1cf8958f6e8e@kernel.org/
--
pw-bot: rejected
^ permalink raw reply [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).