summaryrefslogtreecommitdiffstats
path: root/sys/sys/protosw.h
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>2001-08-10 23:15:13 +0000
committerwpaul <wpaul@FreeBSD.org>2001-08-10 23:15:13 +0000
commit69603fe5d4a5db02b03e6a8d979e6e4ecf1787a4 (patch)
tree65fc7ee5df389e3d8dc729739d518da5eaa8d65a /sys/sys/protosw.h
parentadd729e8404a84d920980fd5865f0ef019373b8b (diff)
downloadFreeBSD-src-69603fe5d4a5db02b03e6a8d979e6e4ecf1787a4.zip
FreeBSD-src-69603fe5d4a5db02b03e6a8d979e6e4ecf1787a4.tar.gz
Fix some of the GDB linkage setup. The l_name member of the gdb linkage
structure is always free()ed yet only sometimes malloc()ed. In particular, it was simply set to point to l_filename from the a linker_file_t in link_elf_link_preload_finish(). The l_filename had been malloc()ed inside the kern_linker.c module and was being free()ed twice: once by link_elf_unload_file() and again by linker_file_unload(), leading to a panic. How to duplicate the problem: - Pre-load a kernel module from the loader, i.e. if_sis.ko - Boot system - Attempt to unload module with kldunload if_sis - Bewm The problem here is that the case where the module was loaded with kldload after system boot would work correctly, so this bug went unnoticed until I stubbed my toe on it just now. (Also, you can only trip this bug if you compile a kernel with options DDB, but that's the default now.) Fix: remember to malloc() a separate copy of the module name for the l_name member of the gdb linkage structure in three places where the linkage structure can be initialized.
Diffstat (limited to 'sys/sys/protosw.h')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud