Re: [PATCH 4/4] mm: Replace simple_strtoul() with kstrtoul()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm trying to come up with a test. I did look into the code and saw that the pointer to the string moves as it's being parsed, and the parsing stops when the string is no longer a number. So I think it's good to use this function to replace simple_strtoul(), as kstrtoul() has an overflow check as a plus.

On Thu, Nov 7, 2024 at 9:20 AM Roman Gushchin <roman.gushchin@xxxxxxxxx> wrote:
On Mon, Nov 04, 2024 at 02:27:37PM -0800, Keren Sun wrote:
> simple_strtoul() has caveat and is obsolete, use kstrtoul() instead in mmcg.
                                                                         ^^^^
                                                                          ?
Btw, did you test this code? Shakeel was poiting out that kstrtoul() might not
work here, is it false?

Thanks!

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux