Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F157464177
D34625.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D34625.diff
View Options
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -369,15 +369,14 @@
* executing, prevent it from rearming itself and let it finish.
*/
if (timevalisset(&p->p_realtimer.it_value) &&
- _callout_stop_safe(&p->p_itcallout, CS_EXECUTING, NULL) == 0) {
+ callout_stop(&p->p_itcallout) == 0) {
timevalclear(&p->p_realtimer.it_interval);
- msleep(&p->p_itcallout, &p->p_mtx, PWAIT, "ritwait", 0);
- KASSERT(!timevalisset(&p->p_realtimer.it_value),
- ("realtime timer is still armed"));
+ PROC_UNLOCK(p);
+ callout_drain(&p->p_itcallout);
+ } else {
+ PROC_UNLOCK(p);
}
- PROC_UNLOCK(p);
-
if (p->p_sysent->sv_onexit != NULL)
p->p_sysent->sv_onexit(p);
seltdfini(td);
diff --git a/sys/kern/kern_time.c b/sys/kern/kern_time.c
--- a/sys/kern/kern_time.c
+++ b/sys/kern/kern_time.c
@@ -950,8 +950,6 @@
kern_psignal(p, SIGALRM);
if (!timevalisset(&p->p_realtimer.it_interval)) {
timevalclear(&p->p_realtimer.it_value);
- if (p->p_flag & P_WEXIT)
- wakeup(&p->p_itcallout);
return;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, May 22, 6:19 PM (14 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33427066
Default Alt Text
D34625.diff (1 KB)
Attached To
Mode
D34625: setitimer: Fix exit race
Attached
Detach File
Event Timeline
Log In to Comment