Message ID | 20250103-netcons_overflow_test-v2-1-a49f9be64c21@debian.org (mailing list archive) |
---|---|
State | New |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | netconsole: selftest for userdata overflow | expand |
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c index f422a2f666ef2276cf5b10e1dbc6badbc8ef0038..86ab4a42769a49eebe5dd6f01dafafc6c86ec54f 100644 --- a/drivers/net/netconsole.c +++ b/drivers/net/netconsole.c @@ -730,7 +730,7 @@ static void update_userdata(struct netconsole_target *nt) struct userdatum *udm_item; struct config_item *item; - if (child_count >= MAX_USERDATA_ITEMS) + if (WARN_ON_ONCE(child_count >= MAX_USERDATA_ITEMS)) break; child_count++;