mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-08 18:57:22 +00:00
simple_strtoul() is deprecated as it has no error checking. Replace it with kstrtouint() which returns an error code on invalid input, and add appropriate error handling. Also add a NULL check before parsing flags, since strsep() can set id to NULL if the input has fewer tokens than expected. Preserve the original behavior for a trailing colon by checking *id before parsing flags, so an empty string results in flags = 0 rather than an error. Signed-off-by: Sajal Gupta <sajal2005gupta@gmail.com> Link: https://patch.msgid.link/20260509095518.2640-1-sajal2005gupta@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1375 lines
33 KiB
1375 lines
33 KiB