Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\bug.c Create Date:2022-07-28 06:17:58
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:report_bug

Proto:enum bug_trap_type report_bug(unsigned long bugaddr, struct pt_regs *regs)

Type:enum bug_trap_type

Parameter:

TypeParameterName
unsigned longbugaddr
struct pt_regs *regs
149  If Not is_valid_bugaddr(bugaddr) Then Return BUG_TRAP_TYPE_NONE
152  bug = find_bug(bugaddr)
153  If Not bug Then Return BUG_TRAP_TYPE_NONE
156  file = NULL
157  line = 0
158  warning = 0
160  If bug Then
169  warning = (flags & BUGFLAG_WARNING) != 0
170  once = (flags & BUGFLAG_ONCE) != 0
171  done = (flags & BUGFLAG_DONE) != 0
173  If warning && once Then
174  If done Then Return BUG_TRAP_TYPE_WARN
180  flags |= BUGFLAG_DONE
190  If (flags & BUGFLAG_NO_CUT_HERE) == 0 Then printk(he default kernel loglevel CUT_HERE)
193  If warning Then
195  __warn(file, line, (void * )bugaddr, BUG_GET_TAINT(bug), regs, NULL)
197  Return BUG_TRAP_TYPE_WARN
200  If file Then pr_crit("kernel BUG at %s:%u!\n", file, line)
202  Else pr_crit("Kernel BUG at %pB [verbose debug info unavailable]\n", (void * )bugaddr)
206  Return BUG_TRAP_TYPE_BUG