Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751527AbdGQWFc (ORCPT ); Mon, 17 Jul 2017 18:05:32 -0400 Received: from www.llwyncelyn.cymru ([82.70.14.225]:39750 "EHLO fuzix.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751318AbdGQWFb (ORCPT ); Mon, 17 Jul 2017 18:05:31 -0400 Date: Mon, 17 Jul 2017 23:04:38 +0100 From: Alan Cox To: Okash Khawaja Cc: Greg Kroah-Hartman , Jiri Slaby , Samuel Thibault , "linux-kernel@vger.kernel.org" , William Hubbs , Chris Brannon , Kirk Reiser , "speakup@linux-speakup.org" , "devel@driverdev.osuosl.org" Subject: Re: [patch 0/3] Re: tty contention resulting from tty_open_by_device export Message-ID: <20170717230438.5c3bd397@alans-desktop> In-Reply-To: <3E107A3D-D8E2-43E5-8DCB-F9DE2F5AAAEA@gmail.com> References: <20170708083803.GA23080@kroah.com> <20170709114153.157783481@gmail.com> <20170710125233.2006733e@alans-desktop> <20170710123307.GA777@sanghar> <20170712192028.70bc0d54@alans-desktop> <20170713112954.GA665@sanghar> <20170717123145.GE24503@kroah.com> <3E107A3D-D8E2-43E5-8DCB-F9DE2F5AAAEA@gmail.com> Organization: Intel Corporation X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 499 Lines: 10 > Sure. I can fix the tty->count mismatch based on Alan's suggestion. However I don't understand why the exclusivity flag should belong to tty_port and not tty_struct. It will be good to know why. We are trying to move all the flags that we can and structs into the tty_port, except any that are used internally within the struct tty level code. The main reason for this is to make the object lifetimes and locking simpler - because the tty_port lasts for the time the hardware is present. Alan