Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F115940839
D34625.id104070.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.id104070.diff
View Options
Index: sys/kern/kern_exit.c
===================================================================
--- sys/kern/kern_exit.c
+++ 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);
Index: sys/kern/kern_time.c
===================================================================
--- sys/kern/kern_time.c
+++ 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
Thu, May 1, 4:35 PM (16 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17886123
Default Alt Text
D34625.id104070.diff (1 KB)
Attached To
Mode
D34625: setitimer: Fix exit race
Attached
Detach File
Event Timeline
Log In to Comment