[RFC PATCH v6 26/34] dyndbg: swap WARN_ON for BUG_ON see what 0-day says

From: Jim Cromie
Date: Sat May 29 2021 - 16:03:39 EST


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@xxxxxxxxx>
---
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