Edward Tomasz Napierala 0b18eb6d74 Stop treating system processes as special. This fixes panics
like the one triggered by this:

# kldload geom_vinum
# pwait `pgrep -S gv_worker` &
# kldunload geom_vinum

or this:

GEOM_JOURNAL: Shutting down geom gjournal 3464572051.
panic: destroying non-empty racct: 1 allocated for resource 6

which were tracked by jh@ to be caused by checking p->p_flag,
while it wasn't initialised yet.  Basically, during fork, the code
checked p_flag, concluded the process isn't marked as P_SYSTEM,
incremented the counter, and later on, when exiting, checked that
the process was marked as P_SYSTEM, and thus didn't decrement it.

Also, I believe there wasn't any good reason for checking P_SYSTEM
in the first place.

Tested by:	jh
2012-04-17 14:31:02 +00:00
..
2012-03-28 20:58:30 +00:00
2011-12-05 10:34:52 +00:00
2011-04-13 11:28:46 +00:00
2012-01-02 12:12:10 +00:00
2012-03-28 20:58:30 +00:00
2012-03-28 20:58:30 +00:00
2010-11-25 20:05:11 +00:00
2012-03-28 20:58:30 +00:00
2012-03-28 20:58:30 +00:00
2012-03-28 20:58:30 +00:00
2011-07-10 00:53:04 +00:00
2012-04-09 18:24:58 +00:00
2012-03-13 20:27:48 +00:00
2012-01-02 12:12:10 +00:00
2012-02-01 14:34:52 +00:00
2012-01-26 16:35:09 +00:00
2012-03-28 20:58:30 +00:00
2012-04-14 23:59:58 +00:00
2012-04-06 06:53:58 +00:00
2012-03-12 11:56:57 +00:00
2012-01-02 12:12:10 +00:00
2012-01-02 12:12:10 +00:00