From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E3AA23624D9 for ; Fri, 27 Feb 2026 18:20:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772216455; cv=none; b=Rl6Hw5YqjYiFzRR9Y/8LI/Fxk/A39gSoi3OkydRoSW7+Sd26y1RR47V4S4i9UjFjs6jz6oLwoMghppH+Vdlyh9isy+7qeyagaqHDLv6OBbyB0fmR+hNVWVVj5Bmw/oiAS/EJoXIZOh9opjPK80xyBQl7UIZLCywNz+dSO7TSdrU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772216455; c=relaxed/simple; bh=/+BxSNVRZEwFS0gnMd67CO0Z4ABi25zA7B0aZoancWg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=efHzI/CcETku7gdeirVKL9D8BRlVI7n7Zhs+j9Qo7qFwMt6mSw+94/Gp5poYdkINdFWWe2KR+MJmsuKKNL9NT1lFl8rPDD1P4p9LPOmrXj99P/9ReNHbLXEAP8nVKVwxLok/EPiDRutRl6dDvg6KTYuaz96UkRoUkC9wKUtLy8g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=fnS/CZne; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="fnS/CZne" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 756DFC116C6; Fri, 27 Feb 2026 18:20:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772216454; bh=/+BxSNVRZEwFS0gnMd67CO0Z4ABi25zA7B0aZoancWg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fnS/CZnechxEWF9VkqZYylOTCl0wEofBqtF8VGayQkJSEw9Lx9gcWArmww+93AKzI 2iVr+5ApFX2P0l0UVTPxGMg04CRKGMqxMX7n1b6kxeMIWYzlrECnIO4yQskEcAlDTj mQn9JZRbmRO+rB5KbK9TBvmpryEreT++9umM3o+IZUtNChOW8VeGxCg2mWw4pWtBOs llYy6ABhP6XU3vPwb90IEFaFzo08wr9HgZJd+3TxD/yVviZ9ISypHcAtJUV92G3/sp vuuTCww8HC6QiiSmbsUyXmmT/P1bnYr5VYqm6sxsvXUl9VV0Cxf/O8VvYdunzKrVH5 N0oPubQRVXP4w== Date: Fri, 27 Feb 2026 08:20:53 -1000 From: Tejun Heo To: David Carlier Cc: David Vernet , linux-kernel@vger.kernel.org Subject: Re: [PATCH] tools/sched_ext: fix strtoul() misuse in scx_hotplug_seq() Message-ID: References: <20260227181439.10323-1-devnexen@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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