diff options
author | Dave Airlie <airlied@redhat.com> | 2024-11-04 14:25:33 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2024-11-04 14:25:33 +1000 |
commit | 30169bb64580bd7bce9290c1952bf0aa6cc37fe5 (patch) | |
tree | 94c6ab9dec68f5648a055752aad32d816bd27e11 /drivers/net/netconsole.c | |
parent | bcfe43f0ea77c42c2154fb79b99b7d1d82ac3231 (diff) | |
parent | 59b723cd2adbac2a34fc8e12c74ae26ae45bf230 (diff) |
Backmerge v6.12-rc6 of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into drm-next
Backmerge Linus tree for some drm-fixes needed for msm and xe merges.
Signed-off-by: Dave Airlie <airlied@redhat.com>
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); |