Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\kprobes.c Create Date:2022-07-28 11:34:50
Last Modify:2022-05-22 18:14:58 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__free_insn_slot

Proto:void __free_insn_slot(struct kprobe_insn_cache *c, kprobe_opcode_t *slot, int dirty)

Type:void

Parameter:

TypeParameterName
struct kprobe_insn_cache *c
kprobe_opcode_t *slot
intdirty
241  mutex_lock( & mutex)
242  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
244  idx = (slot - Page of instruction slots ) / size of instruction slot * sizeof(kprobe_opcode_t)
246  If idx >= 0 && idx < slots_per_page(c) Then Go to out
250  WARN_ON(1)
251  kip = NULL
252  out :
253  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
255  If kip Then
257  WARN_ON(slot_used[idx] != SLOT_USED)
258  If dirty Then
260  ngarbage++
263  Else
267  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
Caller
NameDescribe
free_insn_slot
free_optinsn_slot