From: David van Moolenbroek Date: Wed, 2 May 2012 15:41:17 +0000 (+0200) Subject: VFS: fix "process already free" panic on reboot X-Git-Tag: v3.2.1~560 X-Git-Url: http://zhaoyanbai.com/repos/Bv9ARM.ch12.html?a=commitdiff_plain;h=1817f7fc07a2ed12c732f18e41e5c6b7a4991486;p=minix.git VFS: fix "process already free" panic on reboot Reported by Claudiu Dan Gheorghe, debugged by Thomas and myself --- diff --git a/servers/vfs/misc.c b/servers/vfs/misc.c index 9cfed86af..d0ee9e898 100644 --- a/servers/vfs/misc.c +++ b/servers/vfs/misc.c @@ -359,12 +359,12 @@ void pm_reboot() */ for (i = 0; i < NR_PROCS; i++) { rfp = &fproc[i]; - if (rfp->fp_endpoint == NONE) continue; /* Don't just free the proc right away, but let it finish what it was * doing first */ lock_proc(rfp, 0); - free_proc(rfp, 0); + if (rfp->fp_endpoint != NONE) + free_proc(rfp, 0); unlock_proc(rfp); }