Skip to content

Commit fadb74f

Browse files
lucasdemarchimcgrof
authored andcommitted
module/decompress: Fix error checking on zstd decompression
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: 169a58a ("module/decompress: Support zstd in-kernel decompression") Cc: [email protected] Cc: Luis Chamberlain <[email protected]> Cc: Dmitry Torokhov <[email protected]> Cc: Stephen Boyd <[email protected]> Signed-off-by: Lucas De Marchi <[email protected]> Signed-off-by: Luis Chamberlain <[email protected]>
1 parent db3e33d commit fadb74f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/module/decompress.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ static ssize_t module_zstd_decompress(struct load_info *info,
257257
do {
258258
struct page *page = module_get_next_page(info);
259259

260-
if (!IS_ERR(page)) {
260+
if (IS_ERR(page)) {
261261
retval = PTR_ERR(page);
262262
goto out;
263263
}

0 commit comments

Comments
 (0)