]> www.infradead.org Git - users/willy/pagecache.git/commit
selftests/memfd/memfd_test: fix possible NULL pointer dereference
authorliuye <liuye@kylinos.cn>
Tue, 14 Jan 2025 03:21:15 +0000 (11:21 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Sun, 26 Jan 2025 04:22:44 +0000 (20:22 -0800)
commit73519ded992fc9dda2807450d6931002bb93cb16
tree620279889d311e300562967f435c4cffe2f0d619
parentd94d23fdd7529f1f3218235d1e0a69e9856907b7
selftests/memfd/memfd_test: fix possible NULL pointer dereference

If `name' is NULL, a NULL pointer may be accessed in printf.

Link: https://lkml.kernel.org/r/20250114032115.58638-1-liuye@kylinos.cn
Signed-off-by: liuye <liuye@kylinos.cn>
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Greg Thelen <gthelen@google.com>
Cc: "Isaac J. Manjarres" <isaacmanjarres@google.com>
Cc: Jeff Xu <jeffxu@google.com>
Cc: Saurav Shah <sauravshah.31@gmail.com>
Cc: Shuah Khan (Samsung OSG) <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/selftests/memfd/memfd_test.c