From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by befuddled.reisers.ca (Postfix, from userid 65534) id 443CB1F0709; Tue, 23 May 2017 04:30:44 -0400 (EDT) Received: from mail-it0-x243.google.com (mail-it0-x243.google.com [IPv6:2607:f8b0:4001:c0b::243]) by befuddled.reisers.ca (Postfix) with ESMTPS id 865171F0703 for ; Tue, 23 May 2017 04:30:42 -0400 (EDT) Received: by mail-it0-x243.google.com with SMTP id 67so16449779itx.2 for ; Tue, 23 May 2017 01:30:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=334x+ugnLqPUldCZ+BnXCoRI4vNKnY4pMdD7zeQVzeg=; b=sXUXDtnKTMkClUdbnmNyVdAkxqDYFNhBBqlgrCS+zRwZX/Ve5n/Wredl/nssfZQJy+ R8FRX+1RrZdo88V/bCcKyiWyoSgT3I9ttDFQ8jRWIYEVIWyvlr/ApNwDBUnKuSbN+Wtu oOxPCbAf9mlPra4dA/HsAIectUPDXyno/h2dAFaN+TVXm/LCG6tJfjbCpN7jHRJNGX/T dA2sOuiJb6A4y/JhUY+Alfw8l3Fb71QVHjE1yHsWPoP64ceXsYTpOMVluOSvvMcHi3hl 7oAgu1+ZFfAjZElKXpiaIl4qlaHMgyR+G/U7drxfb/2Hw+dmuiGKVqNTHLC2OCAYyk25 X49A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=334x+ugnLqPUldCZ+BnXCoRI4vNKnY4pMdD7zeQVzeg=; b=ZETY4F4I/269vGsa+ZgA2Yx9mDU3v0IlDMRD2IDv7aQ71dQach8AV9csUIOXhZ6Jee Wsy+R8OAK41tsWvy1TrllyZFaRJUvNtSlhBBFYvENjidomawlXlBAn/HFoaNSWdYTMQI ZkL1eOpDxvzIZDoPDZ7/8nYTfVKF/DYyTR2oYpr1FhqWQ192wnmiPV/A154hGnpPl3kn WLh/mKwvd90sZ7oeDSbHW/nAYE8TNdMAwuKKoqM0qqkVUAmgxeNJVrP/1VsVNMNos2MW aIZTxFr2n5YRoHT+/l0AzlEckVF3XMh/quA19m71lWuq/eElzFcEFHax5EbMO5G23XHu qZcQ== X-Gm-Message-State: AODbwcCG5GHlnnAstDO+fOBlx+a9+jDmfzTvANsdiP7rpApbTklb7E7s KAGgWNyvZyVWmtX8w9HoumiCuzYWmg== X-Received: by 10.36.85.197 with SMTP id e188mr1504397itb.77.1495528234757; Tue, 23 May 2017 01:30:34 -0700 (PDT) MIME-Version: 1.0 Received: by 10.79.154.142 with HTTP; Tue, 23 May 2017 01:30:34 -0700 (PDT) In-Reply-To: <20170522220752.bobyqbmfxnb43dgy@var.youpi.perso.aquilenet.fr> References: <20170225191801.GA4482@sanghar> <20170225192132.GA4492@sanghar> <20170226005342.fwm5wyilv6jewrbb@var.youpi.perso.aquilenet.fr> <20170226010543.prrdalpdj5jfyzee@var.youpi.perso.aquilenet.fr> <20170517074546.uzb6prh7aaa3g5ls@var.youpi.perso.aquilenet.fr> <20170517133832.GA463@sanghar> <20170522220752.bobyqbmfxnb43dgy@var.youpi.perso.aquilenet.fr> From: Okash Khawaja Date: Tue, 23 May 2017 09:30:34 +0100 Message-ID: Subject: Re: [patch 1/6] tty_port: allow a port to be opened with a tty that has no file handle To: Samuel Thibault Cc: "Speakup is a screen review system for Linux." Content-Type: text/plain; charset="UTF-8" X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 X-BeenThere: speakup@linux-speakup.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Speakup is a screen review system for Linux." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 08:30:44 -0000 Hi, On Mon, May 22, 2017 at 11:07 PM, Samuel Thibault wrote: > Hello, > > Okash Khawaja, on mer. 17 mai 2017 14:38:32 +0100, wrote: >> On Wed, May 17, 2017 at 09:45:46AM +0200, Samuel Thibault wrote: >> > > This issue with opening tty from userspace while it's in use from kernel. Wonder >> > > if this will rear its ugly head with rescpect to the recent patches? >> > >> > Ah, yes, we will have to think about that issue. >> >> Would you suggest me raising this with Alan Cox as he mentioned some >> locking to prevent this scenario? > > Mmm, I don't see which locking you refer to, I don't remember Alan Cox > talking about it? It's in the same RFC patch that from Alan: http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1215095.html Here's quote: "It doesn't deal with the case of a user opening a port that's also kernel opened and that would need some locking out (so it returned EBUSY if bound to a kernel device of some kind)." > AFAICS, tty_open() will just always manage to open > the tty, and reach the check_tty_count() call. Yes. Wonder if that is okay then or do we need to do something about it? Thanks, Okash