diff --git a/backport-libkmod-module-check-new_from_name-return-value-in-g.patch b/0001-libkmod-module-check-new_from_name-return-value-in-g.patch similarity index 100% rename from backport-libkmod-module-check-new_from_name-return-value-in-g.patch rename to 0001-libkmod-module-check-new_from_name-return-value-in-g.patch diff --git a/bugfix-kmod-20-8-depmod-Don-t-unlinkat-orig-depfile-and-add-fsync.patch b/0002-kmod-20-8-depmod-Don-t-unlinkat-orig-depfile-and-add-fsync.patch similarity index 100% rename from bugfix-kmod-20-8-depmod-Don-t-unlinkat-orig-depfile-and-add-fsync.patch rename to 0002-kmod-20-8-depmod-Don-t-unlinkat-orig-depfile-and-add-fsync.patch diff --git a/Module-replace-the-module-with-new-module.patch b/0003-Module-replace-the-module-with-new-module.patch similarity index 100% rename from Module-replace-the-module-with-new-module.patch rename to 0003-Module-replace-the-module-with-new-module.patch diff --git a/Module-suspend-the-module-by-rmmod-r-option.patch b/0004-Module-suspend-the-module-by-rmmod-r-option.patch similarity index 100% rename from Module-suspend-the-module-by-rmmod-r-option.patch rename to 0004-Module-suspend-the-module-by-rmmod-r-option.patch diff --git a/don-t-check-module-s-refcnt-when-rmmod-with-r.patch b/0005-don-t-check-module-s-refcnt-when-rmmod-with-r.patch similarity index 100% rename from don-t-check-module-s-refcnt-when-rmmod-with-r.patch rename to 0005-don-t-check-module-s-refcnt-when-rmmod-with-r.patch diff --git a/backport-Fix-modinfo-F-always-shows-name-for-built-ins.patch b/backport-Fix-modinfo-F-always-shows-name-for-built-ins.patch deleted file mode 100644 index ea6eeeed34c080b2ae9e25ae330f93cf3b9d1494..0000000000000000000000000000000000000000 --- a/backport-Fix-modinfo-F-always-shows-name-for-built-ins.patch +++ /dev/null @@ -1,44 +0,0 @@ -From fa67110f896cdef67f42cbc2206ae2a8524acee6 Mon Sep 17 00:00:00 2001 -From: Marco d'Itri -Date: Thu, 7 Jan 2021 20:17:48 -0800 -Subject: [PATCH] Fix "modinfo -F always shows name for built-ins" - -Conflict:NA -Reference:https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git/commit/?id=fa67110f896cdef67f42cbc2206ae2a8524acee6 - -Bug reported by Ben Hutchings : -https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=970871 - - Now that the kernel provides module information for potentially - modular code that's actually built-in, it's possible to query these - built-ins with "modinfo -F". However, this doesn't work quite right: - - $ modinfo -Flicense e1000e - GPL v2 - $ modinfo -Flicense bitrev - name: bitrev - GPL ---- - tools/modinfo.c | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/tools/modinfo.c b/tools/modinfo.c -index 0231bb0..f6a971f 100644 ---- a/tools/modinfo.c -+++ b/tools/modinfo.c -@@ -178,7 +178,11 @@ static int modinfo_do(struct kmod_module *mod) - is_builtin = (filename == NULL); - - if (is_builtin) { -- printf("%-16s%s%c", "name:", kmod_module_get_name(mod), separator); -+ if (field == NULL) -+ printf("%-16s%s%c", "name:", -+ kmod_module_get_name(mod), separator); -+ else if (field != NULL && streq(field, "name")) -+ printf("%s%c", kmod_module_get_name(mod), separator); - filename = "(builtin)"; - } - --- -2.23.0 - diff --git a/backport-depmod-do-not-output-.bin-to-stdout.patch b/backport-depmod-do-not-output-.bin-to-stdout.patch deleted file mode 100644 index be01ce811ab12ac3616f6b21bdc97f5540de02c9..0000000000000000000000000000000000000000 --- a/backport-depmod-do-not-output-.bin-to-stdout.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 53b30aeba2dedae9f5558f560231d9462e063dfc Mon Sep 17 00:00:00 2001 -From: Lucas De Marchi -Date: Thu, 5 Mar 2020 13:33:10 -0800 -Subject: [PATCH] depmod: do not output .bin to stdout - -reason:do not output .bin to stdout -Conflict:NA -Reference:https://lore.kernel.org/linux-modules/20200306075934.3104-1-lucas.demarchi@intel.com/T/#t - -index_write() relies on fseek/ftell to manage the position to which we -are write and thus needs the file stream to support it. - -Right now when trying to write the index to stdout we fail with: - - depmod: tools/depmod.c:416: index_write: Assertion `initial_offset >= 0' failed. - Aborted (core dumped) - -We have no interest in outputting our index to stdout, so just skip it -like is done with other indexes. - -While at it, add/remove some newlines to improve readability. - -Reported-by: Yanko Kaneti -Fix: b866b2165ae6 ("Lookup aliases in the modules.builtin.modinfo") ---- - tools/depmod.c | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/tools/depmod.c b/tools/depmod.c -index fbbce10..875e314 100644 ---- a/tools/depmod.c -+++ b/tools/depmod.c -@@ -2408,8 +2408,10 @@ static int output_builtin_alias_bin(struct depmod *depmod, FILE *out) - struct index_node *idx; - struct kmod_list *l, *builtin = NULL; - -- idx = index_create(); -+ if (out == stdout) -+ return 0; - -+ idx = index_create(); - if (idx == NULL) { - ret = -ENOMEM; - goto fail; -@@ -2456,7 +2458,9 @@ static int output_builtin_alias_bin(struct depmod *depmod, FILE *out) - - if (count) - index_write(idx, out); -+ - index_destroy(idx); -+ - fail: - if (builtin) - kmod_module_unref_list(builtin); --- -2.23.0 - diff --git a/backport-depmod-output_builtin_alias_bin-free-idx-on-error-pa.patch b/backport-depmod-output_builtin_alias_bin-free-idx-on-error-pa.patch deleted file mode 100644 index a8fe60eccca5f181c958e0f72190fcfff46d0cdd..0000000000000000000000000000000000000000 --- a/backport-depmod-output_builtin_alias_bin-free-idx-on-error-pa.patch +++ /dev/null @@ -1,56 +0,0 @@ -From bd96d05256db2ff9a89dbe2e8bb6e26fcb800052 Mon Sep 17 00:00:00 2001 -From: Yauheni Kaliuta -Date: Sun, 29 Nov 2020 18:47:36 +0200 -Subject: [PATCH] depmod: output_builtin_alias_bin: free idx on error path - -reason:depmod: output_builtin_alias_bin free idx on error path -Conflict:NA -Reference:https://lore.kernel.org/linux-modules/20201129164737.135866-2-yauheni.kaliuta@redhat.com/T/#u - -idx is allocated in the beginning but it's not freed if there is -a failure after the allocation. - -Change the error path: return immediately if idx allocation fails -and then free it in both success and error path at the end. - -Signed-off-by: Yauheni Kaliuta ---- - tools/depmod.c | 11 ++++------- - 1 file changed, 4 insertions(+), 7 deletions(-) - -diff --git a/tools/depmod.c b/tools/depmod.c -index 875e314..2c03dfe 100644 ---- a/tools/depmod.c -+++ b/tools/depmod.c -@@ -2412,10 +2412,8 @@ static int output_builtin_alias_bin(struct depmod *depmod, FILE *out) - return 0; - - idx = index_create(); -- if (idx == NULL) { -- ret = -ENOMEM; -- goto fail; -- } -+ if (idx == NULL) -+ return -ENOMEM; - - ret = kmod_module_get_builtin(depmod->ctx, &builtin); - if (ret < 0) { -@@ -2458,13 +2456,12 @@ static int output_builtin_alias_bin(struct depmod *depmod, FILE *out) - - if (count) - index_write(idx, out); -- -- index_destroy(idx); -- - fail: - if (builtin) - kmod_module_unref_list(builtin); - -+ index_destroy(idx); -+ - return ret; - } - --- -2.23.0 - diff --git a/backport-libkmod-allow-modules.alias.builtin-to-be-optional.patch b/backport-libkmod-allow-modules.alias.builtin-to-be-optional.patch deleted file mode 100644 index 6a3a310847e089f6c13588c5f5ce66a00a4b5c0e..0000000000000000000000000000000000000000 --- a/backport-libkmod-allow-modules.alias.builtin-to-be-optional.patch +++ /dev/null @@ -1,46 +0,0 @@ -From d8d1d54051053d770643b59c3f5cf5608a17a0ce Mon Sep 17 00:00:00 2001 -From: Lucas De Marchi -Date: Mon, 9 Mar 2020 22:00:28 -0700 -Subject: [PATCH] libkmod: allow modules.alias.builtin to be optional - ---- - libkmod/libkmod.c | 15 ++++++++++++--- - 1 file changed, 12 insertions(+), 3 deletions(-) - -diff --git a/libkmod/libkmod.c b/libkmod/libkmod.c -index ab5c1e8..43423d6 100644 ---- a/libkmod/libkmod.c -+++ b/libkmod/libkmod.c -@@ -855,8 +855,8 @@ KMOD_EXPORT int kmod_validate_resources(struct kmod_ctx *ctx) - */ - KMOD_EXPORT int kmod_load_resources(struct kmod_ctx *ctx) - { -+ int ret = 0; - size_t i; -- int ret; - - if (ctx == NULL) - return -ENOENT; -@@ -874,8 +874,17 @@ KMOD_EXPORT int kmod_load_resources(struct kmod_ctx *ctx) - index_files[i].fn); - ret = index_mm_open(ctx, path, &ctx->indexes_stamp[i], - &ctx->indexes[i]); -- if (ret) -- break; -+ -+ /* -+ * modules.builtin.alias are considered optional since it's -+ * recently added and older installations may not have it; -+ * we allow failing for any reason -+ */ -+ if (ret) { -+ if (i != KMOD_INDEX_MODULES_BUILTIN_ALIAS) -+ break; -+ ret = 0; -+ } - } - - if (ret) --- -2.19.1 - diff --git a/backport-libkmod-config-fix-a-memory-leak-when-kmod_list_appe.patch b/backport-libkmod-config-fix-a-memory-leak-when-kmod_list_appe.patch deleted file mode 100644 index f6a22885066a2785c4280b50d384bf06acc95c2d..0000000000000000000000000000000000000000 --- a/backport-libkmod-config-fix-a-memory-leak-when-kmod_list_appe.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 39dd171623744ac390dadf487c5a3ebf0b69f2ca Mon Sep 17 00:00:00 2001 -From: Seung-Woo Kim -Date: Fri, 9 Apr 2021 18:44:23 +0900 -Subject: [PATCH] libkmod-config: fix a memory leak when kmod_list_append() - fails - -Conflict:NA -Reference:https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git/commit/?id=39dd171623744ac390dadf487c5a3ebf0b69f2ca - -From kmod_config_new(), when kmod_list_append() fails, -fix not list-appended kmod_config_path leak. - -Signed-off-by: Seung-Woo Kim ---- - libkmod/libkmod-config.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/libkmod/libkmod-config.c b/libkmod/libkmod-config.c -index 4fdd40f..e83621b 100644 ---- a/libkmod/libkmod-config.c -+++ b/libkmod/libkmod-config.c -@@ -909,8 +909,10 @@ int kmod_config_new(struct kmod_ctx *ctx, struct kmod_config **p_config, - memcpy(cf->path, path, pathlen); - - tmp = kmod_list_append(path_list, cf); -- if (tmp == NULL) -+ if (tmp == NULL) { -+ free(cf); - goto oom; -+ } - path_list = tmp; - } - --- -2.23.0 - diff --git a/backport-libkmod-fix-an-overflow-with-wrong-modules.builtin.m.patch b/backport-libkmod-fix-an-overflow-with-wrong-modules.builtin.m.patch deleted file mode 100644 index 21edaf9a7cef63068d2bf2a268d3ae81dc8cc942..0000000000000000000000000000000000000000 --- a/backport-libkmod-fix-an-overflow-with-wrong-modules.builtin.m.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 1cab02ecf6ee2a0aa34f3615dfd99c59f7e04e90 Mon Sep 17 00:00:00 2001 -From: Seung-Woo Kim -Date: Tue, 13 Apr 2021 20:23:14 +0900 -Subject: [PATCH] libkmod: fix an overflow with wrong modules.builtin.modinfo - -Conflict:NA -Reference:https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git/commit/?id=1cab02ecf6ee2a0aa34f3615dfd99c59f7e04e90 - -Fix a possbile overflow with exact PATH_MAX length modname -in wrong modules.builtin.modinfo. - -Signed-off-by: Seung-Woo Kim ---- - libkmod/libkmod-builtin.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libkmod/libkmod-builtin.c b/libkmod/libkmod-builtin.c -index fc9a376..a75a542 100644 ---- a/libkmod/libkmod-builtin.c -+++ b/libkmod/libkmod-builtin.c -@@ -246,7 +246,7 @@ bool kmod_builtin_iter_get_modname(struct kmod_builtin_iter *iter, - - len = dot - line; - -- if (len > PATH_MAX) { -+ if (len >= PATH_MAX) { - sv_errno = ENAMETOOLONG; - goto fail; - } --- -2.23.0 - diff --git a/backport-libkmod-fix-possible-double-free-with-wrong-modules.patch b/backport-libkmod-fix-possible-double-free-with-wrong-modules.patch deleted file mode 100644 index db0b796988621c8a7aac213e9da6ba02f8735bb3..0000000000000000000000000000000000000000 --- a/backport-libkmod-fix-possible-double-free-with-wrong-modules.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 675410c3b3b1cf4523f02ab6e3128c39bd5d5101 Mon Sep 17 00:00:00 2001 -From: Seung-Woo Kim -Date: Tue, 13 Apr 2021 20:23:15 +0900 -Subject: [PATCH] libkmod: fix possible double free with wrong - modules.builtin.modinfo - -Conflict:NA -Reference:https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git/commit/?id=675410c3b3b1cf4523f02ab6e3128c39bd5d5101 - -Fix double free for *modinfo with non '\0' terminated wrong -modules.builtin.modinfo, which is because EOF is minus value. - -Signed-off-by: Seung-Woo Kim ---- - libkmod/libkmod-builtin.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libkmod/libkmod-builtin.c b/libkmod/libkmod-builtin.c -index a75a542..a002cb5 100644 ---- a/libkmod/libkmod-builtin.c -+++ b/libkmod/libkmod-builtin.c -@@ -313,7 +313,7 @@ ssize_t kmod_builtin_get_modinfo(struct kmod_ctx *ctx, const char *modname, - while (offset < iter->next) { - offset = get_string(iter, pos, &line, &linesz); - if (offset <= 0) { -- count = (offset) ? -errno : -EOF; -+ count = (offset) ? -errno : -EINVAL; - free(*modinfo); - goto fail; - } --- -2.23.0 - diff --git a/backport-libkmod-fix-return-error-when-opening-index.patch b/backport-libkmod-fix-return-error-when-opening-index.patch deleted file mode 100644 index c380f74a437816d67698458d09772c170c4b30f5..0000000000000000000000000000000000000000 --- a/backport-libkmod-fix-return-error-when-opening-index.patch +++ /dev/null @@ -1,171 +0,0 @@ -From 3bd7187ff549a2ef2441dcddabf382cc53cf6f22 Mon Sep 17 00:00:00 2001 -From: Lucas De Marchi -Date: Mon, 9 Mar 2020 22:00:27 -0700 -Subject: [PATCH] libkmod: fix return error when opening index - -When calling kmod_load_resources() we could end up getting a bogus -return value -ENOMEM due to several other reasons, like the index not -existing. Change index_mm_open() to propagate the failure reason so we -can take actions on it or return to the caller. ---- - libkmod/libkmod-index.c | 31 +++++++++++++++++++------------ - libkmod/libkmod-index.h | 4 ++-- - libkmod/libkmod.c | 16 ++++++++-------- - 3 files changed, 29 insertions(+), 22 deletions(-) - -diff --git a/libkmod/libkmod-index.c b/libkmod/libkmod-index.c -index 1f3351a..6a34c8d 100644 ---- a/libkmod/libkmod-index.c -+++ b/libkmod/libkmod-index.c -@@ -611,7 +611,7 @@ struct index_value *index_searchwild(struct index_file *in, const char *key) - static const char _idx_empty_str[] = ""; - - struct index_mm { -- struct kmod_ctx *ctx; -+ const struct kmod_ctx *ctx; - void *mm; - uint32_t root_offset; - size_t size; -@@ -739,10 +739,10 @@ static void index_mm_free_node(struct index_mm_node *node) - free(node); - } - --struct index_mm *index_mm_open(struct kmod_ctx *ctx, const char *filename, -- unsigned long long *stamp) -+int index_mm_open(const struct kmod_ctx *ctx, const char *filename, -+ unsigned long long *stamp, struct index_mm **pidx) - { -- int fd; -+ int fd, err; - struct stat st; - struct index_mm *idx; - struct { -@@ -752,28 +752,32 @@ struct index_mm *index_mm_open(struct kmod_ctx *ctx, const char *filename, - } hdr; - void *p; - -+ assert(pidx != NULL); -+ - DBG(ctx, "file=%s\n", filename); - - idx = malloc(sizeof(*idx)); - if (idx == NULL) { - ERR(ctx, "malloc: %m\n"); -- return NULL; -+ return -ENOMEM; - } - - if ((fd = open(filename, O_RDONLY|O_CLOEXEC)) < 0) { - DBG(ctx, "open(%s, O_RDONLY|O_CLOEXEC): %m\n", filename); -+ err = -errno; - goto fail_open; - } - -- if (fstat(fd, &st) < 0) -- goto fail_nommap; -- if ((size_t) st.st_size < sizeof(hdr)) -+ if (fstat(fd, &st) < 0 || (size_t) st.st_size < sizeof(hdr)) { -+ err = -EINVAL; - goto fail_nommap; -+ } - -- if ((idx->mm = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0)) -- == MAP_FAILED) { -+ idx->mm = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0); -+ if (idx->mm == MAP_FAILED) { - ERR(ctx, "mmap(NULL, %"PRIu64", PROT_READ, %d, MAP_PRIVATE, 0): %m\n", - st.st_size, fd); -+ err = -errno; - goto fail_nommap; - } - -@@ -785,12 +789,14 @@ struct index_mm *index_mm_open(struct kmod_ctx *ctx, const char *filename, - if (hdr.magic != INDEX_MAGIC) { - ERR(ctx, "magic check fail: %x instead of %x\n", hdr.magic, - INDEX_MAGIC); -+ err = -EINVAL; - goto fail; - } - - if (hdr.version >> 16 != INDEX_VERSION_MAJOR) { - ERR(ctx, "major version check fail: %u instead of %u\n", - hdr.version >> 16, INDEX_VERSION_MAJOR); -+ err = -EINVAL; - goto fail; - } - -@@ -800,8 +806,9 @@ struct index_mm *index_mm_open(struct kmod_ctx *ctx, const char *filename, - close(fd); - - *stamp = stat_mstamp(&st); -+ *pidx = idx; - -- return idx; -+ return 0; - - fail: - munmap(idx->mm, st.st_size); -@@ -809,7 +816,7 @@ fail_nommap: - close(fd); - fail_open: - free(idx); -- return NULL; -+ return err; - } - - void index_mm_close(struct index_mm *idx) -diff --git a/libkmod/libkmod-index.h b/libkmod/libkmod-index.h -index 52aebac..db671b0 100644 ---- a/libkmod/libkmod-index.h -+++ b/libkmod/libkmod-index.h -@@ -40,8 +40,8 @@ void index_values_free(struct index_value *values); - - /* Implementation using mmap */ - struct index_mm; --struct index_mm *index_mm_open(struct kmod_ctx *ctx, const char *filename, -- unsigned long long *stamp); -+int index_mm_open(const struct kmod_ctx *ctx, const char *filename, -+ unsigned long long *stamp, struct index_mm **pidx); - void index_mm_close(struct index_mm *index); - char *index_mm_search(struct index_mm *idx, const char *key); - struct index_value *index_mm_searchwild(struct index_mm *idx, const char *key); -diff --git a/libkmod/libkmod.c b/libkmod/libkmod.c -index 39f58d9..ab5c1e8 100644 ---- a/libkmod/libkmod.c -+++ b/libkmod/libkmod.c -@@ -856,6 +856,7 @@ KMOD_EXPORT int kmod_validate_resources(struct kmod_ctx *ctx) - KMOD_EXPORT int kmod_load_resources(struct kmod_ctx *ctx) - { - size_t i; -+ int ret; - - if (ctx == NULL) - return -ENOENT; -@@ -871,17 +872,16 @@ KMOD_EXPORT int kmod_load_resources(struct kmod_ctx *ctx) - - snprintf(path, sizeof(path), "%s/%s.bin", ctx->dirname, - index_files[i].fn); -- ctx->indexes[i] = index_mm_open(ctx, path, -- &ctx->indexes_stamp[i]); -- if (ctx->indexes[i] == NULL) -- goto fail; -+ ret = index_mm_open(ctx, path, &ctx->indexes_stamp[i], -+ &ctx->indexes[i]); -+ if (ret) -+ break; - } - -- return 0; -+ if (ret) -+ kmod_unload_resources(ctx); - --fail: -- kmod_unload_resources(ctx); -- return -ENOMEM; -+ return ret; - } - - /** --- -2.19.1 - diff --git a/backport-libkmod-kmod_builtin_get_modinfo-free-modinfo-on-err.patch b/backport-libkmod-kmod_builtin_get_modinfo-free-modinfo-on-err.patch deleted file mode 100644 index 3f234c71e2d3d0934de64601ddcad0dbe327582a..0000000000000000000000000000000000000000 --- a/backport-libkmod-kmod_builtin_get_modinfo-free-modinfo-on-err.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 47807c4cfa5ffe1e5da27e3d3056d9b47ba998c5 Mon Sep 17 00:00:00 2001 -From: Yauheni Kaliuta -Date: Sun, 29 Nov 2020 18:47:35 +0200 -Subject: [PATCH] libkmod: kmod_builtin_get_modinfo: free modinfo on error - -reason:kmod_builtin_get_modinfo: free modinfo on error -Conflict:NA -Reference:https://lore.kernel.org/linux-modules/CAKi4VA+kaWfLZ_Ue-teaJAvDQjfM6G-WK3KmMWVinR-Zg6T64A@mail.gmail.com/T/#t - -The function allocates array but on building it if get_string() -fails it returns the error leaving the array allocated. The caller -does not care about it in error case either. - -Free it to fix memory leak. - -Signed-off-by: Yauheni Kaliuta ---- - libkmod/libkmod-builtin.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/libkmod/libkmod-builtin.c b/libkmod/libkmod-builtin.c -index aaec5dd..fc9a376 100644 ---- a/libkmod/libkmod-builtin.c -+++ b/libkmod/libkmod-builtin.c -@@ -314,6 +314,7 @@ ssize_t kmod_builtin_get_modinfo(struct kmod_ctx *ctx, const char *modname, - offset = get_string(iter, pos, &line, &linesz); - if (offset <= 0) { - count = (offset) ? -errno : -EOF; -+ free(*modinfo); - goto fail; - } - --- -2.23.0 - diff --git a/backport-libkmod-kmod_log_null-qualify-ctx-argument-as-const.patch b/backport-libkmod-kmod_log_null-qualify-ctx-argument-as-const.patch deleted file mode 100644 index 4ac11d08c474ffaf3726b574126762cd362d122e..0000000000000000000000000000000000000000 --- a/backport-libkmod-kmod_log_null-qualify-ctx-argument-as-const.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 95ed3e75365b4922f4d5f3e024a26fe230f3a315 Mon Sep 17 00:00:00 2001 -From: Yauheni Kaliuta -Date: Sun, 29 Nov 2020 18:47:37 +0200 -Subject: [PATCH] libkmod: kmod_log_null: qualify ctx argument as const -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -kmod_log_null() does not change ctx (does nothing). - -Fix warnings - -In file included from libkmod/libkmod-index.c:33: -libkmod/libkmod-index.c: In function ‘index_mm_open’: -libkmod/libkmod-index.c:757:6: warning: passing argument 1 of ‘kmod_log_null’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] - 757 | DBG(ctx, "file=%s\n", filename); - -Signed-off-by: Yauheni Kaliuta ---- - libkmod/libkmod-internal.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libkmod/libkmod-internal.h b/libkmod/libkmod-internal.h -index b22ac2a..398af9c 100644 ---- a/libkmod/libkmod-internal.h -+++ b/libkmod/libkmod-internal.h -@@ -11,7 +11,7 @@ - #include "libkmod.h" - - static _always_inline_ _printf_format_(2, 3) void -- kmod_log_null(struct kmod_ctx *ctx, const char *format, ...) {} -+ kmod_log_null(const struct kmod_ctx *ctx, const char *format, ...) {} - - #define kmod_log_cond(ctx, prio, arg...) \ - do { \ --- -2.23.0 - diff --git a/kmod-27.tar.xz b/kmod-27.tar.xz deleted file mode 100644 index a3e46aeaad49aceb5610a9cc8fa3bac4a9e790ca..0000000000000000000000000000000000000000 Binary files a/kmod-27.tar.xz and /dev/null differ diff --git a/kmod-29.tar.xz b/kmod-29.tar.xz new file mode 100644 index 0000000000000000000000000000000000000000..3f55f714fd5df8d8c768f6063338fa24ac9814a9 Binary files /dev/null and b/kmod-29.tar.xz differ diff --git a/kmod.spec b/kmod.spec index 6a7b883965558dfa3cb1eedb14555c30e6b06de6..4e25b7be063026e667e02e9db353615b3ad8f58c 100644 --- a/kmod.spec +++ b/kmod.spec @@ -1,6 +1,6 @@ Name: kmod -Version: 27 -Release: 8 +Version: 29 +Release: 1 Summary: Kernel module management # GPLv2+ is used by programs, LGPLv2+ is used for libraries. License: GPLv2+ and LGPLv2+ @@ -9,22 +9,11 @@ Source0: https://www.kernel.org/pub/linux/utils/kernel/kmod/%{name}-%{ver Source1: weak-modules Source2: depmod.conf.dist -Patch6000: backport-libkmod-fix-return-error-when-opening-index.patch -Patch6001: backport-libkmod-allow-modules.alias.builtin-to-be-optional.patch -Patch6002: backport-depmod-do-not-output-.bin-to-stdout.patch -Patch6003: backport-libkmod-kmod_builtin_get_modinfo-free-modinfo-on-err.patch -Patch6004: backport-depmod-output_builtin_alias_bin-free-idx-on-error-pa.patch -Patch6005: backport-libkmod-kmod_log_null-qualify-ctx-argument-as-const.patch -Patch6006: backport-Fix-modinfo-F-always-shows-name-for-built-ins.patch -Patch6007: backport-libkmod-config-fix-a-memory-leak-when-kmod_list_appe.patch -Patch6008: backport-libkmod-fix-an-overflow-with-wrong-modules.builtin.m.patch -Patch6009: backport-libkmod-fix-possible-double-free-with-wrong-modules.patch -Patch6010: backport-libkmod-module-check-new_from_name-return-value-in-g.patch - -Patch9000: bugfix-kmod-20-8-depmod-Don-t-unlinkat-orig-depfile-and-add-fsync.patch -Patch9001: Module-replace-the-module-with-new-module.patch -Patch9002: Module-suspend-the-module-by-rmmod-r-option.patch -Patch9003: don-t-check-module-s-refcnt-when-rmmod-with-r.patch +Patch1: 0001-libkmod-module-check-new_from_name-return-value-in-g.patch +Patch2: 0002-kmod-20-8-depmod-Don-t-unlinkat-orig-depfile-and-add-fsync.patch +Patch3: 0003-Module-replace-the-module-with-new-module.patch +Patch4: 0004-Module-suspend-the-module-by-rmmod-r-option.patch +Patch5: 0005-don-t-check-module-s-refcnt-when-rmmod-with-r.patch BuildRequires: gcc chrpath zlib-devel xz-devel libxslt openssl-devel @@ -119,6 +108,9 @@ install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/depmod.d/dist.conf %doc TODO NEWS README %changelog +* Fri Dec 3 2021 zhouwenpei - 29-1 +- update kmod to 29 + * Mon Nov 29 2021 Yang Yanchao - 27-8 - kmod: don't check module's refcnt when rmmod with -r Module: replace the module with new module