diff options
| author | Kees Cook <kees@kernel.org> | 2026-10-05 08:56:53 -0700 |
|---|---|---|
| committer | Kees Cook <kees@kernel.org> | 2026-10-11 21:57:29 -0700 |
| commit | cc9d25b451196e1cdbea5891902cb65b03da1226 (patch) | |
| tree | 7351fb7ef978bdc436e00d096c6e5ce7d0c27bc3 /include/linux | |
| parent | b7e688b5635a0888613f4d620eeb7440e2f23a7e (diff) | |
| download | linux-next-cc9d25b451196e1cdbea5891902cb65b03da1226.tar.gz linux-next-cc9d25b451196e1cdbea5891902cb65b03da1226.zip | |
scsi: lpfc: Print rx monitor records straight into the seq_buf
lpfc_rx_monitor_report() formats each record into a stack buffer, then
appends it with seq_buf_puts(), relying on seq_buf_puts() appending
nothing when a string does not fit: the debugfs output then ends at the
last whole record, and the record left out is read in full next time.
The next patch makes seq_buf_puts() copy as much as fits instead, as
seq_buf_printf() and strlcat() do.
Print each record with seq_buf_printf(), and when it does not fit, end
the string where the record began, since the reader takes the buffer up
to its NUL. This also takes the DBG_LOG_STR_SZ buffer off the stack.
Build tested ARCH=x86_64 with GCC 16.2.0, CONFIG_SCSI_LPFC=m and W=1.
Assisted-by: LLM
Link: https://patch.msgid.link/20261005155708.1471260-3-kees@kernel.org
Signed-off-by: Kees Cook <kees@kernel.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions
