diff options
author | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2024-10-14 09:03:34 +0200 |
---|---|---|
committer | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2024-10-14 09:03:34 +0200 |
commit | bebb45743d52fea1ac0a4a9f465f11d11e885f40 (patch) | |
tree | a1dda3e26ac754e78cbb9734dae3f13f3a8adf39 /drivers/net/netconsole.c | |
parent | ea7f2dfd13e096dce3198e5ffdb00d21bf7c8fe5 (diff) | |
parent | 8e929cb546ee42c9a61d24fae60605e9e3192354 (diff) |
Merge tag 'v6.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into gpio/for-next
Linux 6.12-rc3
Diffstat (limited to 'drivers/net/netconsole.c')
-rw-r--r-- | drivers/net/netconsole.c | 8 |
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); |