aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorZiyang Xuan <[email protected]>2022-09-15 09:08:35 +0800
committerDavid S. Miller <[email protected]>2022-09-21 12:59:22 +0100
commit63b7c2ebcc1d69bbf19e7418ef6c2496364f0ce2 (patch)
treeefe2937b3518dbf1c7c9973b0d34e59fa88863c1 /tools/perf/scripts/python/stackcollapse.py
parent2a566f0148bad759ba6f3758914edda1a8a4181f (diff)
net/af_packet: registration process optimization in packet_init()
Now, register_pernet_subsys() and register_netdevice_notifier() are both after sock_register(). It can create PF_PACKET socket and process socket once sock_register() successfully. It is possible PF_PACKET socket is creating but register_pernet_subsys() and register_netdevice_notifier() are not registered yet. Thus net->packet.sklist_lock and net->packet.sklist will be accessed without initialization that is done in packet_net_init(). Although this is a low probability scenario. Move register_pernet_subsys() and register_netdevice_notifier() to the front in packet_init(). Correspondingly, adjust the unregister process in packet_exit(). Signed-off-by: Ziyang Xuan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions