Commit 2f46093
ipv6: initialize route null entry in addrconf_init()
Andrey reported a crash on init_net.ipv6.ip6_null_entry->rt6i_idev
since it is always NULL.
This is clearly wrong, we have code to initialize it to loopback_dev,
unfortunately the order is still not correct.
loopback_dev is registered very early during boot, we lose a chance
to re-initialize it in notifier. addrconf_init() is called after
ip6_route_init(), which means we have no chance to correct it.
Fix it by moving this initialization explicitly after
ipv6_add_dev(init_net.loopback_dev) in addrconf_init().
Reported-by: Andrey Konovalov <[email protected]>
Signed-off-by: Cong Wang <[email protected]>
Tested-by: Andrey Konovalov <[email protected]>
Signed-off-by: David S. Miller <[email protected]>1 parent 1598195 commit 2f46093
3 files changed
+18
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| 87 | + | |
87 | 88 | | |
88 | 89 | | |
89 | 90 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6573 | 6573 | | |
6574 | 6574 | | |
6575 | 6575 | | |
| 6576 | + | |
| 6577 | + | |
6576 | 6578 | | |
6577 | 6579 | | |
6578 | 6580 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4027 | 4027 | | |
4028 | 4028 | | |
4029 | 4029 | | |
| 4030 | + | |
| 4031 | + | |
| 4032 | + | |
| 4033 | + | |
| 4034 | + | |
| 4035 | + | |
| 4036 | + | |
| 4037 | + | |
| 4038 | + | |
| 4039 | + | |
| 4040 | + | |
| 4041 | + | |
| 4042 | + | |
| 4043 | + | |
| 4044 | + | |
4030 | 4045 | | |
4031 | 4046 | | |
4032 | 4047 | | |
| |||
4053 | 4068 | | |
4054 | 4069 | | |
4055 | 4070 | | |
4056 | | - | |
4057 | | - | |
4058 | | - | |
4059 | | - | |
4060 | | - | |
4061 | | - | |
4062 | | - | |
4063 | | - | |
4064 | | - | |
4065 | | - | |
4066 | | - | |
4067 | 4071 | | |
4068 | 4072 | | |
4069 | 4073 | | |
| |||
0 commit comments