All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] orangefs: use ssize_t instead of size_t for error codes...
@ 2026-09-15 16:30 hubcap
  2026-09-25 14:42 ` Christian Brauner
  0 siblings, 1 reply; 2+ messages in thread
From: hubcap @ 2026-09-15 16:30 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: Mike Marshall, lkp

From: Mike Marshall <hubcap@omnibond.com>

strscpy can return size or errno.

Signed-off-by: Mike Marshall <hubcap@omnibond.com>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202604071606.asPgJ8Fk-lkp@intel.com/
---
 fs/orangefs/orangefs-debugfs.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/fs/orangefs/orangefs-debugfs.c b/fs/orangefs/orangefs-debugfs.c
index 9f94919a6bc6..fec7c1e864d2 100644
--- a/fs/orangefs/orangefs-debugfs.c
+++ b/fs/orangefs/orangefs-debugfs.c
@@ -238,7 +238,7 @@ void orangefs_debugfs_init(int debug_mask)
 static void orangefs_kernel_debug_init(void)
 {
 	static char k_buffer[ORANGEFS_MAX_DEBUG_STRING_LEN] = { };
-	size_t len =
+	ssize_t len =
 		strscpy(k_buffer, kernel_debug_string, sizeof(k_buffer) - 1);
 
 	if (len > 0) {
@@ -246,7 +246,8 @@ static void orangefs_kernel_debug_init(void)
 		k_buffer[len + 1] = '\0';
 	} else {
 		strscpy(k_buffer, "none\n");
-		pr_info("%s: overflow 1!\n", __func__);
+		if (len <0)
+			pr_info("%s: overflow 1!\n", __func__);
 	}
 
 	debugfs_create_file_aux_num(ORANGEFS_KMOD_DEBUG_FILE, 0444, debug_dir, k_buffer,
@@ -337,7 +338,7 @@ static int help_show(struct seq_file *m, void *v)
 static void orangefs_client_debug_init(void)
 {
 	static char c_buffer[ORANGEFS_MAX_DEBUG_STRING_LEN] = { };
-	size_t len =
+	ssize_t len =
 		strscpy(c_buffer, client_debug_string, sizeof(c_buffer) - 1);
 
 	if (len > 0) {
@@ -345,7 +346,8 @@ static void orangefs_client_debug_init(void)
 		c_buffer[len + 1] = '\0';
 	} else {
 		strscpy(c_buffer, "none\n");
-		pr_info("%s: overflow! 2\n", __func__);
+		if (len <0)
+			pr_info("%s: overflow! 2\n", __func__);
 	}
 
 	client_debug_dentry = debugfs_create_file_aux_num(
-- 
2.55.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] orangefs: use ssize_t instead of size_t for error codes...
  2026-09-15 16:30 [PATCH] orangefs: use ssize_t instead of size_t for error codes hubcap
@ 2026-09-25 14:42 ` Christian Brauner
  0 siblings, 0 replies; 2+ messages in thread
From: Christian Brauner @ 2026-09-25 14:42 UTC (permalink / raw)
  To: linux-fsdevel, hubcap; +Cc: Mike Marshall, lkp

On Tue, 15 Sep 2026 12:30:25 -0400, hubcap@kernel.org wrote:
> orangefs: use ssize_t instead of size_t for error codes...

Applied to the vfs-7.4.misc branch of the vfs/vfs.git tree.
Patches in the vfs-7.4.misc branch should appear in linux-next soon.

Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.

It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.

Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs-7.4.misc

[1/1] orangefs: use ssize_t instead of size_t for error codes...
      https://git.kernel.org/vfs/vfs/c/0129ac825a37


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-09-25 14:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-15 16:30 [PATCH] orangefs: use ssize_t instead of size_t for error codes hubcap
2026-09-25 14:42 ` Christian Brauner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.