Bug 11288 - net: netconsole: fix wrong warning
Summary: net: netconsole: fix wrong warning
Status: NEW
Alias: None
Product: ANCK 5.10 Dev
Classification: ANCK
Component: net (show other bugs) net
Version: unspecified
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: XuanZhuo
QA Contact: shuming
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-10-11 16:31 UTC by HLjksuga
Modified: 2024-10-11 16:41 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description HLjksuga inspur_group 2024-10-11 16:31:40 UTC
A warning is triggered when there is insufficient space in the buffer
    for userdata. However, this is not an issue since userdata will be sent
    in the next iteration.

    Current warning message:

        ------------[ cut here ]------------
         WARNING: CPU: 13 PID: 3013042 at drivers/net/netconsole.c:1122 write_ext_msg+0x3b6/0x3d0
          ? write_ext_msg+0x3b6/0x3d0
          console_flush_all+0x1e9/0x330

    The code incorrectly issues a warning when this_chunk is zero, which is
    a valid scenario. The warning should only be triggered when this_chunk
    is negative.

    Fixes: 1ec9daf95093 ("net: netconsole: append userdata to fragmented netconsole messages")
Comment 1 小龙 admin 2024-10-11 16:41:14 UTC
The PR Link: https://gitee.com/anolis/cloud-kernel/pulls/3963