Compare commits
No commits in common. "d6bb447b825c2c99b383a1af322bca9cfbe5ecb0" and "0fa6c88c3596ca1b8af433f09ec6a85cb7251b8a" have entirely different histories.
d6bb447b82
...
0fa6c88c35
@ -1,62 +0,0 @@
|
|||||||
From 4e391ac92d1b9a2c8c0e9d8735d2913ee86c0ad8 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Michal Suchanek <msuchanek@suse.de>
|
|
||||||
Date: Wed, 18 Aug 2021 22:52:00 +0200
|
|
||||||
Subject: [PATCH] libkmod: Set builtin to no when module is created from path.
|
|
||||||
|
|
||||||
A recent bug report showed that modinfo doesn't give the signature
|
|
||||||
information for certain modules, and it turned out to happen only on
|
|
||||||
the modules that are built-in on the running kernel; then modinfo
|
|
||||||
skips the signature check, as if the target module file never exists.
|
|
||||||
The behavior is, however, inconsistent when modinfo is performed for
|
|
||||||
external modules (no matter which kernel version is) and the module
|
|
||||||
file path is explicitly given by a command-line argument, which
|
|
||||||
guarantees the presence of the module file itself.
|
|
||||||
|
|
||||||
Fixes: e7e2cb61fa9f ("modinfo: Show information about built-in modules")
|
|
||||||
Link: https://lore.kernel.org/linux-modules/CAKi4VAJVvY3=JdSZm-GD1hJqyCPYaYz-jBJ_REeY5BakVb6_ww@mail.gmail.com/
|
|
||||||
BugLink: https://bugzilla.opensuse.org/show_bug.cgi?id=1189537
|
|
||||||
Suggested-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
|
|
||||||
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
|
|
||||||
Reviewed-by: Petr Vorel <pvorel@suse.cz>
|
|
||||||
|
|
||||||
Reference: https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git/commit?id=4e391ac92d1b9a2c8c0e9d8735d2913ee86c0ad8
|
|
||||||
Conflict: NA
|
|
||||||
|
|
||||||
---
|
|
||||||
libkmod/libkmod-module.c | 17 +++++++++--------
|
|
||||||
1 file changed, 9 insertions(+), 8 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/libkmod/libkmod-module.c b/libkmod/libkmod-module.c
|
|
||||||
index 6e0ff1a..6f7747c 100644
|
|
||||||
--- a/libkmod/libkmod-module.c
|
|
||||||
+++ b/libkmod/libkmod-module.c
|
|
||||||
@@ -431,17 +431,18 @@ KMOD_EXPORT int kmod_module_new_from_path(struct kmod_ctx *ctx,
|
|
||||||
return -EEXIST;
|
|
||||||
}
|
|
||||||
|
|
||||||
- *mod = kmod_module_ref(m);
|
|
||||||
- return 0;
|
|
||||||
- }
|
|
||||||
+ kmod_module_ref(m);
|
|
||||||
+ } else {
|
|
||||||
+ err = kmod_module_new(ctx, name, name, namelen, NULL, 0, &m);
|
|
||||||
+ if (err < 0) {
|
|
||||||
+ free(abspath);
|
|
||||||
+ return err;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
- err = kmod_module_new(ctx, name, name, namelen, NULL, 0, &m);
|
|
||||||
- if (err < 0) {
|
|
||||||
- free(abspath);
|
|
||||||
- return err;
|
|
||||||
+ m->path = abspath;
|
|
||||||
}
|
|
||||||
|
|
||||||
- m->path = abspath;
|
|
||||||
+ m->builtin = KMOD_MODULE_BUILTIN_NO;
|
|
||||||
*mod = m;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
--
|
|
||||||
2.33.0
|
|
||||||
|
|
||||||
@ -1,33 +0,0 @@
|
|||||||
From 39dd171623744ac390dadf487c5a3ebf0b69f2ca Mon Sep 17 00:00:00 2001
|
|
||||||
From: Seung-Woo Kim <sw0312.kim@samsung.com>
|
|
||||||
Date: Fri, 9 Apr 2021 18:44:23 +0900
|
|
||||||
Subject: [PATCH] libkmod-config: fix a memory leak when kmod_list_append()
|
|
||||||
fails
|
|
||||||
|
|
||||||
From kmod_config_new(), when kmod_list_append() fails,
|
|
||||||
fix not list-appended kmod_config_path leak.
|
|
||||||
|
|
||||||
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
|
|
||||||
---
|
|
||||||
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 7b62367..78957db 100644
|
|
||||||
--- a/libkmod/libkmod-config.c
|
|
||||||
+++ b/libkmod/libkmod-config.c
|
|
||||||
@@ -853,8 +853,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
|
|
||||||
|
|
||||||
26
kmod.spec
26
kmod.spec
@ -1,6 +1,6 @@
|
|||||||
Name: kmod
|
Name: kmod
|
||||||
Version: 27
|
Version: 27
|
||||||
Release: 12
|
Release: 6
|
||||||
Summary: Kernel module management
|
Summary: Kernel module management
|
||||||
# GPLv2+ is used by programs, LGPLv2+ is used for libraries.
|
# GPLv2+ is used by programs, LGPLv2+ is used for libraries.
|
||||||
License: GPLv2+ and LGPLv2+
|
License: GPLv2+ and LGPLv2+
|
||||||
@ -15,8 +15,6 @@ Patch6002: backport-depmod-do-not-output-.bin-to-stdout.patch
|
|||||||
Patch6003: backport-libkmod-kmod_builtin_get_modinfo-free-modinfo-on-err.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
|
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
|
Patch6005: backport-libkmod-kmod_log_null-qualify-ctx-argument-as-const.patch
|
||||||
Patch6006: backprot-libkmod-config-fix-a-memory-leak-when-kmod_list_appe.patch
|
|
||||||
Patch6007: backport-libkmod-Set-builtin-to-no-when-module-is-created-fro.patch
|
|
||||||
Patch9000: bugfix-kmod-20-8-depmod-Don-t-unlinkat-orig-depfile-and-add-fsync.patch
|
Patch9000: bugfix-kmod-20-8-depmod-Don-t-unlinkat-orig-depfile-and-add-fsync.patch
|
||||||
|
|
||||||
BuildRequires: gcc chrpath zlib-devel xz-devel libxslt openssl-devel
|
BuildRequires: gcc chrpath zlib-devel xz-devel libxslt openssl-devel
|
||||||
@ -125,26 +123,8 @@ install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/depmod.d/dist.conf
|
|||||||
%doc TODO NEWS README
|
%doc TODO NEWS README
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Wed Dec 18 2024 wangxiao <wangxiao184@h-partners.com> - 27-12
|
* Fri Jan 15 2021 shanzhikun <shanzhikun@huawei.com> - 27-6
|
||||||
- libkmod: Set builtin to no when module is created from path
|
- add package python3-kmod.
|
||||||
|
|
||||||
* Thu Jul 21 2022 liwenchong <liwenchong@kylinos.cn> - 27-11
|
|
||||||
- fix memeory leak
|
|
||||||
|
|
||||||
* Fri Aug 13 2021 YangYanchao <yangyanchao6@huawei.com> - 27-10
|
|
||||||
- weak-modules: fix a bug when using weak_modules without '$'
|
|
||||||
|
|
||||||
* Fri Aug 13 2021 YangYanchao <yangyanchao6@huawei.com> - 27-9
|
|
||||||
- weak-modules: fix a bug when /lib/modules/`uname -r`/weak-update does not exist
|
|
||||||
|
|
||||||
* Wed Apr 7 2021 YangYanchao <yangyanchao6@huawei.com> - 27-8
|
|
||||||
- backport weak-modules script from fedora
|
|
||||||
|
|
||||||
* Thu Jan 14 2021 xinghe <xinghe1@huawei.com> - 27-7
|
|
||||||
- fix memory leak in kmodinfo
|
|
||||||
|
|
||||||
* Fri Jan 8 2020 xinghe <xinghe1@huawei.com> - 27-6
|
|
||||||
- fix compilation warning
|
|
||||||
|
|
||||||
* Thu Jan 14 2021 xinghe <xinghe1@huawei.com> - 27-5
|
* Thu Jan 14 2021 xinghe <xinghe1@huawei.com> - 27-5
|
||||||
- fix memory leak in modinfo and build warning
|
- fix memory leak in modinfo and build warning
|
||||||
|
|||||||
1176
weak-modules
1176
weak-modules
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user