]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
PM / devfreq: governor: Replace sscanf() with kstrtoul() in set_freq_store()
authorLifeng Zheng <zhenglifeng1@huawei.com>
Mon, 21 Apr 2025 03:00:17 +0000 (11:00 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:25:52 +0000 (16:25 +0200)
commitcb2e990ed30ccb0a6c02f751dc7dc46df0850013
treea1d4ea1f87fdb9be1f4179b16d22c26b6c566c8b
parent265583266d93db4ff83d088819b1f63fdf0131db
PM / devfreq: governor: Replace sscanf() with kstrtoul() in set_freq_store()

[ Upstream commit 914cc799b28f17d369d5b4db3b941957d18157e8 ]

Replace sscanf() with kstrtoul() in set_freq_store() and check the result
to avoid invalid input.

Signed-off-by: Lifeng Zheng <zhenglifeng1@huawei.com>
Link: https://lore.kernel.org/lkml/20250421030020.3108405-2-zhenglifeng1@huawei.com/
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/devfreq/governor_userspace.c