]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
test_list_sort: fix up const mismatch
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Dec 2025 12:36:52 +0000 (13:36 +0100)
committerShuah Khan <skhan@linuxfoundation.org>
Mon, 5 Jan 2026 22:32:03 +0000 (15:32 -0700)
commit90b5f2dce9d919a4e37abf29598d23c7f20108ba
treea54aedfc3be8080fb5489c5fc02898c316324ac9
parente70a307b852804b2a7aaaafdd37542ca11e6eb00
test_list_sort: fix up const mismatch

In the internal cmp function, a const pointer is cast out to a non-const
pointer by using container_of().  This is probably not what is intended
at all, so fix up the const marking to properly preserve what is really
happening (i.e. the const should flow through the container_of() call)

Cc: Jakub Kicinski <kuba@kernel.org>
Cc: David Gow <davidgow@google.com>
Cc: "Masami Hiramatsu (Google)" <mhiramat@kernel.org>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Kees Cook <kees@kernel.org>
Cc: linux-kernel@vger.kernel.org
Link: https://lore.kernel.org/all/2025121751-backtrack-manifesto-7c57@gregkh/#r
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: David Gow <davidgow@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
lib/tests/test_list_sort.c