Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\swapfile.c Create Date:2022-07-28 15:16:44
Last Modify:2020-03-17 22:19:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:It's possible scan_swap_map() uses a free cluster in the middle of free* cluster list. Avoiding such abuse to avoid list corruption.

Proto:static bool scan_swap_map_ssd_cluster_conflict(struct swap_info_struct *si, unsigned long offset)

Type:bool

Parameter:

TypeParameterName
struct swap_info_struct *si
unsigned longoffset
582  offset /= SWAPFILE_CLUSTER
583  conflict = Not cluster_list_empty( & clusters list ) && offset != cluster_list_first( & clusters list ) && cluster_is_free( & cluster info. Only for SSD [offset])
587  If Not conflict Then Return false
590  percpu_cluster = this_cpu_ptr(per cpu's swap location )
591  cluster_set_null( & Current cluster index )
592  Return true
Caller
NameDescribe
scan_swap_map_slots