summaryrefslogtreecommitdiff
path: root/drivers/net/netconsole.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2024-10-25 10:54:09 +0200
committerTakashi Iwai <tiwai@suse.de>2024-10-25 10:54:09 +0200
commit0216ded72db896b24cbdd8cd6531482571b25cf6 (patch)
tree56b578e29657bd3df8236c5f0cf6b8f13c17232a /drivers/net/netconsole.c
parent52345d35622026b99271edc1c58ad7cfef3b7567 (diff)
parent04177158cf98a79744937893b100020d77e6f9ac (diff)
Merge branch 'topic/compress-accel' into for-next
Pull compress-offload API extension for accel operation mode Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'drivers/net/netconsole.c')
-rw-r--r--drivers/net/netconsole.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
index 01cf33fa7503..de20928f7402 100644
--- a/drivers/net/netconsole.c
+++ b/drivers/net/netconsole.c
@@ -1161,8 +1161,14 @@ static void send_ext_msg_udp(struct netconsole_target *nt, const char *msg,
this_chunk = min(userdata_len - sent_userdata,
MAX_PRINT_CHUNK - preceding_bytes);
- 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 + this_offset,
userdata + sent_userdata,
this_chunk);