Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:shm_may_destroy - identifies whether shm segment should be destroyed now* Returns true if and only if there are no active users of the segment and* one of the following is true:* 1) shmctl(id, IPC_RMID, NULL) was called for this shp* 2) sysctl kernel

Proto:static bool shm_may_destroy(struct ipc_namespace *ns, struct shmid_kernel *shp)

Type:bool

Parameter:

TypeParameterName
struct ipc_namespace *ns
struct shmid_kernel *shp
311  Return shm_nattch == 0 && (shm_rmid_forced || mode & segment will be destroyed on last detach )
Caller
NameDescribe
shm_close
shm_try_destroy_orphanedCalled with ns->shm_ids(ns).rwsem locked
exit_shmLocking assumes this will only be called with task == current
do_shmatFix shmaddr, allocate descriptor, map shm, add attach descriptor to lists.* NOTE! Despite the name, this is NOT a direct system call entrypoint. The* "raddr" thing points to kernel space, and there has to be a wrapper around* this.