[PATCH 6.17 059/159] coredump: fix core_pattern input validation