Message ID | 20240830-xfrm_hash_rebuild-dir-v1-1-f75092d07e1b@kernel.org (mailing list archive) |
---|---|
State | Rejected |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [ipsec-next] xfrm: Initialise dir in xfrm_hash_rebuild() | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Guessing tree name failed - patch did not apply |
+ 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/
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;
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(+)