mm/damon: don't use strnlen() with known-bogus source length
authorAdam Borowski <kilobyte@angband.pl>
Fri, 24 Sep 2021 22:43:26 +0000 (15:43 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 24 Sep 2021 23:13:34 +0000 (16:13 -0700)
commit892ab4bbd063cfe7f6bbb183e6be69d9907a61de
tree27c125ebddfd9d6593109eb70b2bde2c380da56a
parentfa360beac4b62d54879a88b182afef4b369c9700
mm/damon: don't use strnlen() with known-bogus source length

gcc knows the true length too, and rightfully complains.

Link: https://lkml.kernel.org/r/20210912204447.10427-1-kilobyte@angband.pl
Signed-off-by: Adam Borowski <kilobyte@angband.pl>
Cc: SeongJae Park <sj38.park@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/damon/dbgfs-test.h