Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\jump_label.c Create Date:2022-07-28 13:49:04
Last Modify:2020-03-17 20:59:06 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:jump_label_add_module

Proto:static int jump_label_add_module(struct module *mod)

Type:int

Parameter:

TypeParameterName
struct module *mod
609  iter_start = jump_entries
610  iter_stop = iter_start + num_jump_entries
612  struct static_key * key = NULL
616  If iter_start == iter_stop Then Return 0
619  jump_label_sort_entries(iter_start, iter_stop)
621  When iter < iter_stop cycle
624  If within_module_init(jump_entry_code(iter), mod) Then jump_entry_set_init(iter)
627  iterk = jump_entry_key(iter)
628  If iterk == key Then Continue
631  key = iterk
632  If within_module((unsignedlong)key, mod) Then
634  Continue
636  jlm = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
637  If Not jlm Then Return -ENOMEM
639  If Not static_key_linked(key) Then
642  If Not jlm2 Then
643  kfree(jlm)
644  Return -ENOMEM
648  preempt_enable()
650  next = NULL
654  mod = mod
655  entries = iter
656  next = static_key_mod(key)
657  This sets key->next and preserves the type bits.* See additional comments above static_key_set_entries().
658  static_key_set_linked(key)
661  If jump_label_type(iter) != jump_label_init_type(iter) Then __jump_label_update(key, iter, iter_stop, true)
665  Return 0
Caller
NameDescribe
jump_label_module_notify