From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 14:35:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DEA6C106564A; Sun, 2 Sep 2012 14:35:19 +0000 (UTC) (envelope-from edschouten@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 587E08FC08; Sun, 2 Sep 2012 14:35:18 +0000 (UTC) Received: by obbun3 with SMTP id un3so10440566obb.13 for ; Sun, 02 Sep 2012 07:35:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=VaNhOhGTvkq4A5dnWWZyN+h9ktJhlf/uJHcDrxtGF/Y=; b=NRa+LbwFBxJnz13BvA68oTLcvlfuA9oMl6nDpgaE/sr2hotfnWoay8Wpb0x0QcTE9F UMgoEi29iaD5XnxbYrX0M3a/4Ib5qvrO044NI1vJmWRWMgCh4UI/Qa4MunIdFxbDz8S8 h+sPO5Z5dvd05LAM+QezAQysMjH7fdyWi0hD9n9qw+iGXzJwMPMSzy24Jn/ztyerkyk2 JpVuRyvjY15WShZmnafpbLGNY48SHIZmFA7cp2w8aWakfEE/gC5rf9vXfAj6A93fmYl7 4XoXn3xdBTPxY+EoOl9Ds5T3BR00E9u10rf1gQss3Nbx+MUihbXwUS7+cK0P3GfrfQX3 ZOGA== MIME-Version: 1.0 Received: by 10.60.7.230 with SMTP id m6mr4699758oea.41.1346596517287; Sun, 02 Sep 2012 07:35:17 -0700 (PDT) Sender: edschouten@gmail.com Received: by 10.76.1.78 with HTTP; Sun, 2 Sep 2012 07:35:17 -0700 (PDT) In-Reply-To: <201206180734.q5I7YcRv062474@svn.freebsd.org> References: <201206180734.q5I7YcRv062474@svn.freebsd.org> Date: Sun, 2 Sep 2012 16:35:17 +0200 X-Google-Sender-Auth: hMvluQpp3hmmaYdMCpuO_YPd0PQ Message-ID: From: Ed Schouten To: Peter Holm , kib@FreeBSD.org Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r237219 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Sep 2012 14:35:20 -0000 Hi Peter, Sorry for replying to this email so late; I moved to Germany in April and I'm still waiting for Deutsche Telekomiker to hook up my internet connection. Fortunately I do have a smartphone with tethering now. All hail German bureaucracy. 2012/6/18 Peter Holm : > In tty_makedev() the following construction: > > dev = make_dev_cred(); > dev->si_drv1 = tp; > > leaves a small window where the newly created device may be opened > and si_drv1 is NULL. > > As this is a vary rare situation, using a lock to close the window > seems overkill. Instead just wait for the assignment of si_drv1. I also thought about this in the past and I guess a lot of drivers in our tree are prone to this issue. I think there's little more we can do here than how you've changed the TTY code, but in my opinion a 'devfs-ng' should solve this by having a two-step creation procedure, similar to, say, fdrop(9). Thanks for fixing this! -- Ed Schouten