diff options
| author | Sabrina Dubroca <sd@queasysnail.net> | 2018-08-28 13:40:52 +0200 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2019-05-03 19:24:03 +0200 |
| commit | d7c91acd0aaa76d965281eb4a0ecafc0d0476c89 (patch) | |
| tree | 1aa3fd9e59312079dec2789b3456834daf6bb4b8 /net/wireless | |
| parent | a8614988634e797604befa9c05fef0aa863cabc1 (diff) | |
ipv6: fix cleanup ordering for pingv6 registration
commit a03dc36bdca6b614651fedfcd8559cf914d2d21d upstream.
Commit 6d0bfe226116 ("net: ipv6: Add IPv6 support to the ping socket.")
contains an error in the cleanup path of inet6_init(): when
proto_register(&pingv6_prot, 1) fails, we try to unregister
&pingv6_prot. When rawv6_init() fails, we skip unregistering
&pingv6_prot.
Example of panic (triggered by faking a failure of
proto_register(&pingv6_prot, 1)):
general protection fault: 0000 [#1] PREEMPT SMP KASAN PTI
[...]
RIP: 0010:__list_del_entry_valid+0x79/0x160
[...]
Call Trace:
proto_unregister+0xbb/0x550
? trace_preempt_on+0x6f0/0x6f0
? sock_no_shutdown+0x10/0x10
inet6_init+0x153/0x1b8
Fixes: 6d0bfe226116 ("net: ipv6: Add IPv6 support to the ping socket.")
Change-Id: I09f665479b350f3272e12cd36cc7c4c2153606ae
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'net/wireless')
0 files changed, 0 insertions, 0 deletions
