~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
..
libkmod 2 12 years ago Lucas De Marchi Rename libabc to libkmod Diff
m4 1 12 years ago Lucas De Marchi Import skeleton from libabc Diff
man 439 12 years ago Lucas De Marchi rename doc dir to man Diff
shared 919 10 years ago Lucas De Marchi Move macro.h to shared directory It's not really Diff
shell-completion 815 11 years ago Lucas De Marchi shell-completion: Add initial completion for kmod Diff
testsuite 495 12 years ago Lucas De Marchi testsuite: add skeleton Diff
tools 163 12 years ago Lucas De Marchi Merge branch 'use-mmap' Conflicts: libkmod/libkm Diff
.gitignore 1328 5 months ago Lucas De Marchi build: Ignore directories commonly used for out-of 324 bytes Diff Download File
File autogen.sh 1316 8 months ago Lucas De Marchi Drop python bindings Python bindings are not well 1.7 KB Diff Download File
CODING-STYLE 971 9 years ago Lucas De Marchi CODING-STYLE: add include order 2.3 KB Diff Download File
configure.ac 1326 7 months ago Lucas De Marchi Install kmod.pc in ${datadir}/pkgconfig The data 11.3 KB Diff Download File
COPYING 928 10 years ago Lucas De Marchi Clarify what licences apply where This doesn't ch 25.8 KB Diff Download File
Makefile.am 1326 7 months ago Lucas De Marchi Install kmod.pc in ${datadir}/pkgconfig The data 13.5 KB Diff Download File
NEWS 1324 7 months ago Lucas De Marchi kmod 32 31.4 KB Diff Download File
README.md 1316 8 months ago Lucas De Marchi Drop python bindings Python bindings are not well 3.6 KB Diff Download File
TODO 1142 6 years ago Lucas De Marchi libkmod-module: check for NULL before accessing po 2.1 KB Diff Download File