Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp360091imm; Thu, 30 Aug 2018 00:11:53 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYuy4pnj9gc/6R7wCh267A/Qel0tJ39RFh98hxEvF3NZ4DOhznqhxcYJbYq4IVdBiTNUz2J X-Received: by 2002:a17:902:64c1:: with SMTP id y1-v6mr8852635pli.45.1535613113461; Thu, 30 Aug 2018 00:11:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535613113; cv=none; d=google.com; s=arc-20160816; b=HjB3sMnQ3QhXVZmeqVNQ5pP7n8qjt2Dn7r4edTVjn3z62CmOPv/JN1nZfoue6EO7wW NAYnrC6vaJGiXW+87EWP6XaxGX8wS6i3DSkvIEK+y+eBj+gspjiivTHaZu/A70BxMvnc sCHTZODurclzHvjyiztLT0/7fGzADMFO2F1lJMjHxvVWci/RV4fFkIjD47EThUMmJyko kdxCkFHryL5cfzswhnBlT82UWvbThIjZEUdgePG1OTxfPssTt6LlLmiVmdCOw1pNRxH4 ik42ZhEeeBRjrcW9XUyYufajIQrdt3AYIOSAIeYPlnpYNAKI/wRqJcc7zWGCOnRk7GK+ md8A== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=l8KDxQ67tUL01tcLfM9IQc9OnPGfgkENbpoYc+/rxOg=; b=mTDaIiWzLYZFq94AdCrT4LUf+jyeFjpPQOPkrN65jeggUmJUSUGpPGgl/To+DN+boC hIewuSxN6/8rq0SSglM/edrgsHlYPuzydQZYIwtpsD3rrU1kPiaTctJbqf86dd+66Flf IlRpKOqLBoQaEBMAUJVZP7nZPJ0+AQ8SC2hsQC2BbQ3lFTNdK+6eqo4Qb4hSoL/7jUoh +3X+1xouu0FMmFow8W2eNZ6QtvOrrPL666zNSRRZ1g6Byyc4FOGmQnCBDh8cw/oiQVSA h7gX99jV8WD69Z5xreG/AuJ6X6GFjq/OOCYy/laVoBv2VxTqEARJKdHp9c5H4Gkp7jVy cj+w== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=iki.fi Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s16-v6si5439724plp.317.2018.08.30.00.11.37; Thu, 30 Aug 2018 00:11:53 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=iki.fi Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727599AbeH3LLJ (ORCPT + 99 others); Thu, 30 Aug 2018 07:11:09 -0400 Received: from emh04.mail.saunalahti.fi ([62.142.5.110]:44612 "EHLO emh04.mail.saunalahti.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726169AbeH3LLI (ORCPT ); Thu, 30 Aug 2018 07:11:08 -0400 X-Greylist: delayed 425 seconds by postgrey-1.27 at vger.kernel.org; Thu, 30 Aug 2018 07:11:07 EDT Received: from ydin.reaktio.net (reaktio.net [85.76.255.15]) by emh04.mail.saunalahti.fi (Postfix) with ESMTP id F3D5F30088; Thu, 30 Aug 2018 10:03:16 +0300 (EEST) Received: by ydin.reaktio.net (Postfix, from userid 1001) id 6771B36C0F6; Thu, 30 Aug 2018 10:03:16 +0300 (EEST) Date: Thu, 30 Aug 2018 10:03:16 +0300 From: Pasi =?iso-8859-1?Q?K=E4rkk=E4inen?= To: Dmitry Safonov Cc: linux-kernel@vger.kernel.org, Dmitry Safonov <0x7f454c46@gmail.com>, Daniel Axtens , Dmitry Vyukov , Michael Neuling , Mikulas Patocka , Peter Hurley , Sergey Senozhatsky , Tan Xiaojun , Greg Kroah-Hartman , Jiri Slaby , stable@vger.kernel.org, Nathan March , centos-virt@centos.org Subject: Re: [PATCH 0/4] tty: Hold write ldisc sem in tty_reopen() Message-ID: <20180830070316.GE9060@reaktio.net> References: <20180829022353.23568-1-dima@arista.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180829022353.23568-1-dima@arista.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Dmitry, On Wed, Aug 29, 2018 at 03:23:49AM +0100, Dmitry Safonov wrote: > Two fixes for potential and real issues. > Looks worth to have in stables as we've hit it on v4.9 stable. > And for linux-next - adding lockdep asserts for line discipline changing > code, verifying that write ldisc sem will be held forthwith. > > I couldn't verify that holding write lock fixes the issue as we've hit > it only once and I've failed in reproducing it. > But searching in lkml, Cc'ing here people who probably had the same > crash (and in hope someone of them could give tested-by): > And thanks a lot for your work on fixing these issues! I've added Nathan (and centos-virt) to CC, because earlier Nathan was able to reliably trigger ldisc related kernel crash in Xen dom0 when running Linux 4.9 kernel, which seems similar to what your patch 2/4 is trying to fix. Nathan's kernel crash report: https://lists.centos.org/pipermail/centos-virt/2017-August/005610.html Example ldisc kernel crash BUG in "n_tty_receive_buf_common": https://lists.centos.org/pipermail/centos-virt/attachments/20170823/45493276/attachment.txt CentOS bug: https://bugs.centos.org/view.php?id=13713 Thanks, -- Pasi > Cc: Daniel Axtens > Cc: Dmitry Vyukov > Cc: Michael Neuling > Cc: Mikulas Patocka > Cc: Pasi K?rkk?inen > Cc: Peter Hurley > Cc: Sergey Senozhatsky > Cc: Tan Xiaojun > (please, ignore if I Cc'ed you mistakenly) > > Dmitry Safonov (4): > tty: Drop tty->count on tty_reopen() failure > tty: Hold tty_ldisc_lock() during tty_reopen() > tty: Lock tty pair in tty_init_dev() > tty/lockdep: Add ldisc_sem asserts > > drivers/tty/tty_io.c | 21 +++++++++++++++------ > drivers/tty/tty_ldisc.c | 12 ++++++++---- > include/linux/tty.h | 4 ++++ > 3 files changed, 27 insertions(+), 10 deletions(-) > > -- > 2.13.6 >