~registry/kmod/master

  • Committer: Lucas De Marchi
  • Author(s): Emil Velikov
  • Date: 2024-04-30 17:33:52 UTC
  • Revision ID: git-v1:90b271fbd2b9708a8fa79b7e98d90c7919e7ed73
libkmod: clear file->memory if map fails

On mmap failure file->memory is set to -1, which we'll happily pass down
to munmap later on.

More importantly, since we do a NULL check in kmod_file_load_contents()
we will exit the function without (re)attempting the load again.

Since we ignore the return code for the load function(s), one can end up
calling kmod_elf_get_memory() and feed that -1 into init_module.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Filename Latest Rev Last Changed Committer Comment Size
..
docs 409 12 years ago Lucas De Marchi doc: add gtk-doc to generate documentation Curren Diff
.gitignore 2 12 years ago Lucas De Marchi Rename libabc to libkmod 45 bytes Diff Download File
COPYING 182 12 years ago Lucas De Marchi Change licenses libkmod is under LGPL 2.1 or late 25.8 KB Diff Download File
libkmod-builtin.c 1293 1 year ago Lucas De Marchi libkmod: annotate kmod_builtin_iter API as static 6.2 KB Diff Download File
libkmod-config.c 1229 3 years ago Lucas De Marchi libkmod-config: fix a memory leak when kmod_list_a 29.2 KB Diff Download File
libkmod-elf.c 1301 1 year ago Lucas De Marchi libkmod: Do not inititialize file->memory on open 27.9 KB Diff Download File
libkmod-file.c 1332 5 months ago Lucas De Marchi libkmod: clear file->memory if map fails On mmap 10.8 KB Diff Download File
libkmod-index.c 1195 4 years ago Lucas De Marchi libkmod: fix return error when opening index When 23 KB Diff Download File
libkmod-index.h 1195 4 years ago Lucas De Marchi libkmod: fix return error when opening index When 1.7 KB Diff Download File
libkmod-internal.h 1305 1 year ago Lucas De Marchi libkmod: Use kernel decompression when available 10.3 KB Diff Download File
libkmod-list.c 961 9 years ago Lucas De Marchi Remove FSF mailing address It has changed in the 6.8 KB Diff Download File
libkmod-module.c 1305 1 year ago Lucas De Marchi libkmod: Use kernel decompression when available 72.3 KB Diff Download File
libkmod-signature.c 1313 11 months ago Lucas De Marchi libkmod: remove pkcs7 obj_to_hash_algo() Switch t 8.3 KB Diff Download File
libkmod.c 1314 10 months ago Lucas De Marchi libkmod, depmod, modprobe: Make directory for kern 23.8 KB Diff Download File
libkmod.h 1263 2 years ago Lucas De Marchi libkmod: Allow to ignore log message on module rem 9.4 KB Diff Download File
libkmod.pc.in 1198 4 years ago Lucas De Marchi add Zstandard compression support I changed the s 270 bytes Diff Download File
libkmod.sym 1248 2 years ago Lucas De Marchi libkmod: Add lookup from module name Slightly dif 2 KB Diff Download File
Makefile 863 10 years ago Lucas De Marchi build-sys: add small redirecting Makefiles These 332 bytes Diff Download File
README 813 11 years ago Lucas De Marchi README: Move items from TODO Put the differences 1.2 KB Diff Download File