From: Kent Overstreet <kent.overstreet@linux.dev>
To: linux-bcachefs@vger.kernel.org
Cc: Kent Overstreet <kent.overstreet@linux.dev>,
Alexander Viro <viro@zeniv.linux.org.uk>
Subject: [PATCH] bcachefs: fix build on sh4
Date: Fri, 8 Aug 2025 23:19:44 -0400 [thread overview]
Message-ID: <20250809031944.1579293-1-kent.overstreet@linux.dev> (raw)
put_user() with a 64 bit value causes an ICE on sh4.
Reported-by: Alexander Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
---
fs/bcachefs/sb-counters.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/bcachefs/sb-counters.c b/fs/bcachefs/sb-counters.c
index 2b4b8445d418..9fa2c568c985 100644
--- a/fs/bcachefs/sb-counters.c
+++ b/fs/bcachefs/sb-counters.c
@@ -136,7 +136,7 @@ long bch2_ioctl_query_counters(struct bch_fs *c,
? percpu_u64_get(&c->counters[i])
: c->counters_on_mount[i];
- ret = put_user(v, &user_arg->d[stable]);
+ ret = copy_to_user_errcode(&user_arg->d[stable], &v, sizeof(v));
if (ret)
return ret;
}
--
2.50.1
next reply other threads:[~2025-08-09 3:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-09 3:19 Kent Overstreet [this message]
2025-08-09 3:37 ` [PATCH] bcachefs: fix build on sh4 Al Viro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250809031944.1579293-1-kent.overstreet@linux.dev \
--to=kent.overstreet@linux.dev \
--cc=linux-bcachefs@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.