NetBSD Problem Report #37093
From martin@duskware.de Tue Oct 9 13:01:50 2007
Return-Path: <martin@duskware.de>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by narn.NetBSD.org (Postfix) with ESMTP id 70CFE63B8D8
for <gnats-bugs@gnats.netbsd.org>; Tue, 9 Oct 2007 13:01:50 +0000 (UTC)
Message-Id: <20071009130126.7282E63B8D8@narn.NetBSD.org>
Date: Tue, 9 Oct 2007 13:01:26 +0000 (UTC)
From: ad@netbsd.org
Reply-To: ad@netbsd.org
To: netbsd-bugs-owner@NetBSD.org
Subject: itimer problems
X-Send-Pr-Version: www-1.0
>Number: 37093
>Category: kern
>Synopsis: itimer problems
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: ad
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Oct 09 13:05:01 +0000 2007
>Closed-Date: Mon Apr 21 00:22:18 +0000 2008
>Last-Modified: Mon Apr 21 00:22:18 +0000 2008
>Originator: Andrew Doran
>Release: NetBSD 4.99.32
>Organization:
The NetBSD Project
>Environment:
N/A
>Description:
itimers are fired from hardclock(). There are a few problems:
- itimer code run in process context has scant splsched() protection
- hardclock() is called w/o kernel_lock held and the code is not MP
safe.
- itimerfire() may try to send signals with ksiginfo, which will
use ksiginfo_pool and thus the VM system above IPL_VM.
>How-To-Repeat:
Code inspection.
>Fix:
- Defer sending signals to a soft interrupt.
- Spinlock the itimers.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: kern-bug-people->ad
Responsible-Changed-By: ad@netbsd.org
Responsible-Changed-When: Wed, 17 Oct 2007 17:36:56 +0000
Responsible-Changed-Why:
Mine.
From: Andrew Doran <ad@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/37093 CVS commit: src/sys
Date: Mon, 21 Apr 2008 00:13:47 +0000 (UTC)
Module Name: src
Committed By: ad
Date: Mon Apr 21 00:13:46 UTC 2008
Modified Files:
src/sys/compat/linux/common: linux_misc_notalpha.c
src/sys/kern: init_main.c kern_clock.c kern_time.c syscalls.master
src/sys/sys: timevar.h
Log Message:
timer fixes for PR 37093:
- Fix serious concurrency problems, making the code MT and MP safe in
the process.
- Don't allocate memory or inspect process state from hardclock().
To generate a diff of this commit:
cvs rdiff -r1.100 -r1.101 src/sys/compat/linux/common/linux_misc_notalpha.c
cvs rdiff -r1.349 -r1.350 src/sys/kern/init_main.c
cvs rdiff -r1.119 -r1.120 src/sys/kern/kern_clock.c
cvs rdiff -r1.141 -r1.142 src/sys/kern/kern_time.c
cvs rdiff -r1.196 -r1.197 src/sys/kern/syscalls.master
cvs rdiff -r1.20 -r1.21 src/sys/sys/timevar.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: ad@NetBSD.org
State-Changed-When: Mon, 21 Apr 2008 00:22:18 +0000
State-Changed-Why:
fixed
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.