Date: Thu, 11 Jun 2009 20:49:09 GMT From: Nima Misaghian <nmisaghian@sandvine.com> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/135485: During a shutdown, kernel modules should be unloaded in reverse order in which they where loaded Message-ID: <200906112049.n5BKn9qa093033@www.freebsd.org> Resent-Message-ID: <200906112050.n5BKo1GM041079@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 135485 >Category: kern >Synopsis: During a shutdown, kernel modules should be unloaded in reverse order in which they where loaded >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Jun 11 20:50:01 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Nima Misaghian >Release: 6.1 >Organization: Sandvine >Environment: >Description: During a shutdown, kernel modules should be unloaded in reverse order in which they where loaded. Otherwise, modules that other modules depend on are unloaded first, which could cause problems. >How-To-Repeat: >Fix: src/sys/kern/kern_module.c < typedef TAILQ_HEAD(modulelist, module) modulelist_t; > typedef TAILQ_HEAD(, module) modulelist_t; static void module_shutdown(void *arg1, int arg2) { module_t mod; if (arg2 & RB_NOSYNC) return; MOD_SLOCK; < TAILQ_FOREACH_REVERSE(mod, &modules, modulelist, link) > TAILQ_FOREACH(mod, &modules, link) MOD_EVENT(mod, MOD_SHUTDOWN); MOD_SUNLOCK; } >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906112049.n5BKn9qa093033>