On 2021/09/22 14:42, Rin Okuyama wrote:
Module Name:    src
Committed By:   rin
Date:           Wed Sep 22 05:42:19 UTC 2021

Modified Files:
        src/sys/kern: kern_ksyms.c

Log Message:
ksymsmmap: Add missing uao_reference(9) call for ks->ks_uobj.

Fix failure for savecore(8) and subsequent kernel panic, introduced to
kern_ksyms.c rev 1.03, at least for sh3 and alpha.

Oops, I meant rev 1.103 here.

For sh3 and alpha, savecore(8) supports coff and ecoff, respectively, via
libkvm via nlist(3). nlist(3) routines for coff and ecoff use mmap(2) and
munmap(2) for /dev/ksyms.

This munmap(2) decrements reference count for ks->ks_uobj. Unless it is
incremented in ksymsmmap(), ks->ks_uobj will be freed unexpectedly.


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/sys/kern/kern_ksyms.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Reply via email to