From: Tejun Heo <tj@kernel.org>
To: David Carlier <devnexen@gmail.com>
Cc: David Vernet <void@manifault.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tools/sched_ext: fix strtoul() misuse in scx_hotplug_seq()
Date: Fri, 27 Feb 2026 08:20:53 -1000 [thread overview]
Message-ID: <aaHghbuOjg08mjLi@slm.duckdns.org> (raw)
In-Reply-To: <20260227181439.10323-1-devnexen@gmail.com>
On Fri, Feb 27, 2026 at 06:14:39PM +0000, David Carlier wrote:
> + val = strtol(buf, NULL, 10);
> + SCX_BUG_ON(val < 0, "invalid num hotplug events: %ld", val);
This isn't a proper way to detect conversion errors either, right? Wouldn't
it be better to keep strtoul() and test whether endptr reaches \0?
Thanks.
--
tejun
next prev parent reply other threads:[~2026-02-27 18:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-27 18:14 David Carlier
2026-02-27 18:20 ` Tejun Heo [this message]
2026-02-27 18:43 David Carlier
2026-02-27 19:19 ` Tejun Heo
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=aaHghbuOjg08mjLi@slm.duckdns.org \
--to=tj@kernel.org \
--cc=devnexen@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=void@manifault.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®