diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c index 92001f7af380c79e8bf1a85d4a733defe737969f..360f0f92264db56becf3c1ae9ab547c0f291c214 100644 --- a/drivers/net/netconsole.c +++ b/drivers/net/netconsole.c @@ -805,7 +805,12 @@ static void send_ext_msg_udp(struct netconsole_target *nt, const char *msg, this_chunk = min(body_len - offset, MAX_PRINT_CHUNK - this_header); - if (WARN_ON_ONCE(this_chunk <= 0)) + if (WARN_ON_ONCE(this_chunk < 0)) + /* this_chunk could be zero if all the previous + * message used all the buffer. This is not a + * problem, userdata will be sent in the next + * iteration + */ return; memcpy(buf + this_header, body + offset, this_chunk);