Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\page_alloc.c Create Date:2022-07-28 15:03:11
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:bad_page

Proto:static void bad_page(struct page *page, const char *reason, unsigned long bad_flags)

Type:void

Parameter:

TypeParameterName
struct page *page
const char *reason
unsigned longbad_flags
623  If nr_shown == 60 Then
624  If time_before(jiffies, resume) Then
625  nr_unshown++
626  Go to out
628  If nr_unshown Then
629  pr_alert("BUG: Bad page state: %lu messages suppressed\n", nr_unshown)
632  nr_unshown = 0
634  nr_shown = 0
636  If nr_shown++ == 0 Then resume = jiffies + 60 * HZ
639  pr_alert("BUG: Bad page state in process %s pfn:%05lx\n", comm, page_to_pfn(page))
641  __dump_page(page, reason)
642  bad_flags &= Atomic flags, some possibly * updated asynchronously
643  If bad_flags Then pr_alert("bad because of flags: %#lx(%pGp)\n", bad_flags, & bad_flags)
646  dump_page_owner(page)
648  Don't grab lock, we're oopsing.
649  dump_stack()
650  out :
652  The atomic page->_mapcount, starts from -1: so that transitions* both from it and to it can be tracked, using atomic_inc_and_test* and atomic_add_negative(-1).
653  add_taint: add a taint flag if not already set.*@flag: one of the TAINT_* constants.*@lockdep_ok: whether lock debugging is still OK.* If something bad has gone wrong, you'll want @lockdebug_ok = false, but for
Caller
NameDescribe
free_pages_check_bad
free_tail_pages_check
check_new_page_bad