]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
module/decompress: Fix error checking on zstd decompression
authorLucas De Marchi <lucas.demarchi@intel.com>
Thu, 1 Jun 2023 21:23:31 +0000 (14:23 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Jun 2023 08:48:18 +0000 (10:48 +0200)
commita5187ae55c6435a91dd20083b0352863606e4e14
treeefb2916cde76817e7eda6279d1b35bb06901f660
parentb3b340ae1697cd594fdfcdbdd81094b098e2d98b
module/decompress: Fix error checking on zstd decompression

commit fadb74f9f2f609238070c7ca1b04933dc9400e4a upstream.

While implementing support for in-kernel decompression in kmod,
finit_module() was returning a very suspicious value:

finit_module(3, "", MODULE_INIT_COMPRESSED_FILE) = 18446744072717407296

It turns out the check for module_get_next_page() failing is wrong,
and hence the decompression was not really taking place. Invert
the condition to fix it.

Fixes: 169a58ad824d ("module/decompress: Support zstd in-kernel decompression")
Cc: stable@kernel.org
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/module/decompress.c