* 4.19 queue: netfilter: conntrack: unregister ipv4 sockopts on error unwind
@ 2021-06-07 22:38 Pavel Machek
2021-06-07 23:48 ` Sasha Levin
0 siblings, 1 reply; 2+ messages in thread
From: Pavel Machek @ 2021-06-07 22:38 UTC (permalink / raw)
To: sashal, linux-kernel, stable, fw, pablo
[-- Attachment #1: Type: text/plain, Size: 999 bytes --]
Hi!
That patch is wrong for 4.19. Wrong version is 066585c43 in stable
queue.
netfilter: conntrack: unregister ipv4 sockopts on error unwind
[ Upstream commit 22cbdbcfb61acc78d5fc21ebb13ccc0d7e29f793 ]
When ipv6 sockopt register fails, the ipv4 one needs to be
removed.
...
+++ b/net/netfilter/nf_conntrack_proto.c
@@ -962,7 +962,7 @@ int nf_conntrack_proto_init(void)
nf_unregister_sockopt(&so_getorigdst);
#if IS_ENABLED(CONFIG_IPV6)
cleanup_sockopt:
- nf_unregister_sockopt(&so_getorigdst6);
+ nf_unregister_sockopt(&so_getorigdst);
#endif
return ret;
Note the context. cleanup_sockopt2: needs to do
nf_unregister_sockopt(&so_getorigdst6);, otherwise we end up
unregistering the same pointer twice.
(AFAICT it is ok in mainline and 5.10).
Best regards,
Pavel
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: 4.19 queue: netfilter: conntrack: unregister ipv4 sockopts on error unwind
2021-06-07 22:38 4.19 queue: netfilter: conntrack: unregister ipv4 sockopts on error unwind Pavel Machek
@ 2021-06-07 23:48 ` Sasha Levin
0 siblings, 0 replies; 2+ messages in thread
From: Sasha Levin @ 2021-06-07 23:48 UTC (permalink / raw)
To: Pavel Machek; +Cc: linux-kernel, stable, fw, pablo
On Tue, Jun 08, 2021 at 12:38:54AM +0200, Pavel Machek wrote:
>Hi!
>
>That patch is wrong for 4.19. Wrong version is 066585c43 in stable
>queue.
>
> netfilter: conntrack: unregister ipv4 sockopts on error unwind
>
> [ Upstream commit 22cbdbcfb61acc78d5fc21ebb13ccc0d7e29f793 ]
>
> When ipv6 sockopt register fails, the ipv4 one needs to be
> removed.
>
>...
>
>+++ b/net/netfilter/nf_conntrack_proto.c
>@@ -962,7 +962,7 @@ int nf_conntrack_proto_init(void)
> nf_unregister_sockopt(&so_getorigdst);
> #if IS_ENABLED(CONFIG_IPV6)
>cleanup_sockopt:
> - nf_unregister_sockopt(&so_getorigdst6);
> + nf_unregister_sockopt(&so_getorigdst);
> #endif
> return ret;
>
>Note the context. cleanup_sockopt2: needs to do
>nf_unregister_sockopt(&so_getorigdst6);, otherwise we end up
>unregistering the same pointer twice.
Good catch! I've dropped it from 4.19, the rest of the trees look ok.
--
Thanks,
Sasha
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-07 23:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-07 22:38 4.19 queue: netfilter: conntrack: unregister ipv4 sockopts on error unwind Pavel Machek
2021-06-07 23:48 ` Sasha Levin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.