When a process knote was attached to the process which is already exiting,
the knote is activated immediately. If the exit1() later activates knotes, such knote is attempted to be activated second time. Detect the condition by zeroed kn_ptr.p_proc pointer, and avoid excessive activation. Before r302235, such knotes were removed from the knlist immediately upon activation. Reported by: truckman Sponsored by: The FreeBSD Foundation Approved by: re (gjb)
This commit is contained in:
parent
eec8884595
commit
e18ee4957d
@ -451,6 +451,9 @@ filt_proc(struct knote *kn, long hint)
|
||||
u_int event;
|
||||
|
||||
p = kn->kn_ptr.p_proc;
|
||||
if (p == NULL) /* already activated, from attach filter */
|
||||
return (0);
|
||||
|
||||
/* Mask off extra data. */
|
||||
event = (u_int)hint & NOTE_PCTRLMASK;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user