lkml.org 
[lkml]   [2021]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC PATCH v6 26/34] dyndbg: swap WARN_ON for BUG_ON see what 0-day says
Date
HEAD~1 passed 0-day, Im not sure what it does with WARNs,
so make everything fatal, see what dies.

Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
---
lib/dynamic_debug.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index f333fcb6cf1f..659e864837ad 100644
--- a/lib/dynamic_debug.c
+++ b/lib/dynamic_debug.c
@@ -150,7 +150,7 @@ static struct _ddebug_site *ddebug_site_get(struct _ddebug *dp)
{
struct _ddebug *dh = dp - (dp->_index);

- WARN_ON(!is_dyndbg_header_pair(dh, dh->site));
+ BUG_ON(!is_dyndbg_header_pair(dh, dh->site));
#ifdef SITE_CHK
if (dp >= __start___dyndbg && dp < __stop___dyndbg) {

@@ -159,14 +159,14 @@ static struct _ddebug_site *ddebug_site_get(struct _ddebug *dp)
dh->site[dp->_index].filename,
dh->site[dp->_index].function, dp->lineno);

- WARN_ON(dp != &__start___dyndbg[dp->_index]);
+ BUG_ON(dp != &__start___dyndbg[dp->_index]);

- WARN_ON(!(dp->_index == (dp - dh) &&
+ BUG_ON(!(dp->_index == (dp - dh) &&
dp->_index == (dp - __start___dyndbg) &&
dp->_index == (&__start___dyndbg_sites[dp->_index]
- &__start___dyndbg_sites[0])));
if (dp->site)
- WARN_ON(&__start___dyndbg_sites[dp->_index] != dp->site);
+ BUG_ON(&__start___dyndbg_sites[dp->_index] != dp->site);
} else {
v4pr_info("get: %s is loaded: %d %s:%s:%d\n",
dh->site[dp->_index].modname, dp->_index,
@@ -174,7 +174,7 @@ static struct _ddebug_site *ddebug_site_get(struct _ddebug *dp)
dh->site[dp->_index].function, dp->lineno);
}
if (dp->site)
- WARN_ON(&dh->site[dp->_index] != dp->site);
+ BUG_ON(&dh->site[dp->_index] != dp->site);

return dp->site;
#else
@@ -1258,7 +1258,7 @@ static int __init dynamic_debug_init(void)

for (i = 0; iter < __stop___dyndbg; iter++, site++, i++) {

- SITE_CHK_(WARN_ON(site != iter->site));
+ SITE_CHK_(BUG_ON(site != iter->site));

if (strcmp(modname, site->modname)) {
modct++;
--
2.31.1
\
 
 \ /
  Last update: 2021-05-29 22:04    [W:0.179 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site