Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5249297imm; Tue, 18 Sep 2018 06:42:31 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbF99sPlGDywUI6MjdGEJiMbkBzgyio/7ISbDLv503hkMqt+LSHG+c645lEu2KA2RxX8mlP X-Received: by 2002:a17:902:28e8:: with SMTP id f95-v6mr29405153plb.240.1537278151296; Tue, 18 Sep 2018 06:42:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537278151; cv=none; d=google.com; s=arc-20160816; b=hYNUgse2gcIp6MngkNizhOYIFp//3aNl4G7mWlAwyp7LHFm8d4h5zl1qCk3OXsMZop SoYTodkl3XfjaxWu25Lf8Q+/7/Aj+O7a5JvtrCYW6HwHfoSqGa3n8zVgWpoCjG1jj4E6 nVZKIMwmECCKR9zPCohA3U4b0oHDzJAWnr5WU7HMMmY9i6uHDC+LLxlddVeFYp5T94HS FSZXS3XCaYd7pV6HHEsVGhy3HH6j/t9MsJjfeR1q3BKIawle7q8Yt3DrAauON3YabJMR vNFPL9RVa02CQS6mUTfInN6bN2aIb+AMt2+zgbBweo2AjahVHRqTHi768u3imzL/uePH DapA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=+YtahQCIZN7QYty2fqWWo42lPeRmJlOl6Q+wnHPVm3s=; b=esk4k8bpF8116EN/QTt87Av6KKM8FRdBomwxkmQZDdFSdEbQjH2RcKOeQekEa6nSwv HkKltGtUZuAbR4WaK85NpE5CHkfvYLwBVv1HNNgzReWdSw01bG8/25H1nAqJxHB3Mhkp WdtArlp6vOM4qGTdJPPMj0fyeUPTQGqhQsJ1OUCftAdkq2DBDLjGvcJekEgDr58eFBZT DzbExQf8hmo4tg+1osvjNo8XrCfBxQ69auYJf0ifRFFMvdM5wMfX4jEpTrNrcQwVGKM0 HzHZ9OF6mCxA6QXCPFyKRV65yQ/JxRlqwBfPknGs2oIlyo5VNgv/jKqpzvyNoxQpmqBL vG8Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j193-v6si17141929pge.617.2018.09.18.06.42.06; Tue, 18 Sep 2018 06:42:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729689AbeIRTOd (ORCPT + 99 others); Tue, 18 Sep 2018 15:14:33 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:39202 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727207AbeIRTOd (ORCPT ); Tue, 18 Sep 2018 15:14:33 -0400 Received: from localhost (unknown [147.67.4.98]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 1A4C48E2; Tue, 18 Sep 2018 13:41:53 +0000 (UTC) Date: Tue, 18 Sep 2018 15:41:50 +0200 From: Greg Kroah-Hartman To: Dmitry Safonov Cc: linux-kernel@vger.kernel.org, Dmitry Safonov <0x7f454c46@gmail.com>, Daniel Axtens , Dmitry Vyukov , Mark Rutland , Michael Neuling , Mikulas Patocka , Nathan March , Pasi =?iso-8859-1?Q?K=E4rkk=E4inen?= , Peter Hurley , Peter Zijlstra , "Rong, Chen" , Sergey Senozhatsky , Tan Xiaojun , Tetsuo Handa , Jiri Slaby , Jiri Slaby , stable@vger.kernel.org Subject: Re: [PATCHv5 1/7] tty: Drop tty->count on tty_reopen() failure Message-ID: <20180918134150.GC23431@kroah.com> References: <20180917235258.5719-1-dima@arista.com> <20180917235258.5719-2-dima@arista.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180917235258.5719-2-dima@arista.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 18, 2018 at 12:52:52AM +0100, Dmitry Safonov wrote: > In case of tty_ldisc_reinit() failure, tty->count should be decremented > back, otherwise we will never release_tty(). > Tetsuo reported that it fixes noisy warnings on tty release like: > pts pts4033: tty_release: tty->count(10529) != (#fd's(7) + #kopen's(0)) > > Fixes: commit 892d1fa7eaae ("tty: Destroy ldisc instance on hangup") > Minor nit, no need to have "commit" in this line, it's implied. Also, no need to put an extra line here either. I'll queue this patch up now, have some question about the rest... thanks, greg k-h