Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:ipc\shm.c Create Date:2022-07-28 16:48:39
Last Modify:2020-03-17 22:58:32 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:detach and kill segment if marked destroyed.* The work is done in shm_close.

Proto:long ksys_shmdt(char __user *shmaddr)

Type:long

Parameter:

TypeParameterName
char __user *shmaddr
1628  mm = mm
1630  addr = shmaddr
1631  retval = -EINVAL
1633  size = 0
1638  If addr & ~PAGE_MASK Then Return retval
1641  If lock for writing Then Return -EINTR
1665  vma = look up the first VMA in which addr resides, NULL if none* - should be called with mm->mmap_sem at least held readlocked
1668  When vma cycle
1669  next = linked list of VM areas per task, sorted by address
1694  retval = 0
1695  vma = next
1696  Break
1698  vma = next
1706  size = align the pointer to the (next) page boundary (size)
1707  When vma && The first byte after our end addresswithin vm_mm. - addr <= size cycle
1708  next = linked list of VM areas per task, sorted by address
1711  If Function pointers to deal with this struct. == shm_vm_ops && (Our start address within vm_mm. - addr) / PAGE_SIZE == Offset (within vm_file) in PAGE_SIZEunits && File we map to (can be NULL). == file Then do_munmap(mm, Our start address within vm_mm. , The first byte after our end addresswithin vm_mm. - Our start address within vm_mm. , NULL)
1715  vma = next
1729  lease a write lock
1730  Return retval
Caller
NameDescribe
SYSCALL_DEFINE1
ksys_ipc