Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1153279imm; Wed, 19 Sep 2018 13:04:21 -0700 (PDT) X-Google-Smtp-Source: ANB0VdacJq5euEYEFNxomQ//eHB2S0PfQW3fBpuKUyzw6VvgE3dbDoG1/Wzz0UII7g8yvIsPD0Yh X-Received: by 2002:aa7:8087:: with SMTP id v7-v6mr37467023pff.38.1537387461261; Wed, 19 Sep 2018 13:04:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537387461; cv=none; d=google.com; s=arc-20160816; b=wYBrqneQWKcicTHaBsovWQQsRl1khKrLf8PHszK3l3OhEV7gi/NDL21V359cdghK5R tZUxQbBNzFTR7/MxICFuJSJNvTEakNfJfpNbsPrLsb9KX5tSaIGiuJ8hVBmNZbkfsh4X gal9BK8fTcD13uZ+hDkmv/Rmp+oTDOFq8m0IslercN0tLX5VQ/8ZrkskmUWZNROERDxJ sEXT7cWQWdnjI2STEUsdUmSG6ATc4FfH43WpyG6kDBwOMxyzt1JpLFUjNcTQeQm0FHvv 04ByaxhIu7vvySr824I32voZt+mRA1cOIpxLZkX48GIZgu+Zmb4VEJD1PjuHhYez1lkH YIWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=CfRhpxRMec5EPnbxlUdBmQD7NXrFJs3EoynqXht5eTo=; b=QPgtS+2Cpd9ts3r4EdxHOhvjp5tQD0WWuDbu621lZPavnhKSvWWZGM7FOcj3GsV9g8 KjPdglbzty7J0B4TtFRm2yqhvGvgeGnXxbMGwqh6qG3lptBavrE5MwtbKaWkwYSAzafg Wqc4ltYlC4LzIoPpGNp99xBkBw28Z2wMnjAu0H7iDkv7PLxOTLpbEFCK03HS3cCPglOE fx/8DVVmgq0imjZ/MFzZva+gM54nDUYHqk/3uKSq3EOXHrTs6atwKDAZRWWT2qoMGTfZ cQKlD0otiCv2LFnluqCK+6dubmxsh5omaVrXW82g5S2VvcN6ifyhtCabWwOooWue1yBD A5TA== 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 13-v6si21884284pgp.563.2018.09.19.13.04.05; Wed, 19 Sep 2018 13:04:21 -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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732304AbeITBnS (ORCPT + 99 others); Wed, 19 Sep 2018 21:43:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57202 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731368AbeITBnS (ORCPT ); Wed, 19 Sep 2018 21:43:18 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6B7F31E2D5; Wed, 19 Sep 2018 20:03:47 +0000 (UTC) Received: from file01.intranet.prod.int.rdu2.redhat.com (file01.intranet.prod.int.rdu2.redhat.com [10.11.5.7]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 318A1176DC; Wed, 19 Sep 2018 20:03:46 +0000 (UTC) Received: from file01.intranet.prod.int.rdu2.redhat.com (localhost [127.0.0.1]) by file01.intranet.prod.int.rdu2.redhat.com (8.14.4/8.14.4) with ESMTP id w8JK3jZP016713; Wed, 19 Sep 2018 16:03:45 -0400 Received: from localhost (mpatocka@localhost) by file01.intranet.prod.int.rdu2.redhat.com (8.14.4/8.14.4/Submit) with ESMTP id w8JK3fWo016709; Wed, 19 Sep 2018 16:03:41 -0400 X-Authentication-Warning: file01.intranet.prod.int.rdu2.redhat.com: mpatocka owned process doing -bs Date: Wed, 19 Sep 2018 16:03:41 -0400 (EDT) From: Mikulas Patocka X-X-Sender: mpatocka@file01.intranet.prod.int.rdu2.redhat.com To: Dmitry Safonov cc: linux-kernel@vger.kernel.org, Dmitry Safonov <0x7f454c46@gmail.com>, Daniel Axtens , Dmitry Vyukov , Mark Rutland , Michael Neuling , Nathan March , =?ISO-8859-15?Q?Pasi_K=E4rkk=E4inen?= , Peter Hurley , Peter Zijlstra , "Rong, Chen" , Sergey Senozhatsky , Tan Xiaojun , Tetsuo Handa , stable@vger.kernel.org, Greg Kroah-Hartman , Jiri Slaby , Jiri Slaby , syzbot+3aa9784721dfb90e984d@syzkaller.appspotmail.com Subject: Re: [PATCHv5 0/7] tty: Hold write ldisc sem in tty_reopen() In-Reply-To: <1537379148.21380.16.camel@arista.com> Message-ID: References: <20180917235258.5719-1-dima@arista.com> <1537379148.21380.16.camel@arista.com> User-Agent: Alpine 2.02 (LRH 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 19 Sep 2018 20:03:48 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 19 Sep 2018, Dmitry Safonov wrote: > On Wed, 2018-09-19 at 13:35 -0400, Mikulas Patocka wrote: > > > > On Wed, 19 Sep 2018, Mikulas Patocka wrote: > > > > > > > > > > > On Tue, 18 Sep 2018, Dmitry Safonov wrote: > > > > > > > Hi all, > > > > > > > > Three fixes that worth to have in the @stable, as they were hit > > by > > > > different people, including Arista 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. > > > > > > > > The last patch is an optional and probably, timeout can be > > dropped for > > > > read_lock(). I'll do it if everyone agrees. > > > > (Or as per discussion with Peter in v3, just convert ldisc to > > > > a regular rwsem). > > > > > > > > Thanks, > > > > Dima > > > > > > I confirm that this patch series fixes the crash for me. > > > > > > Tested-by: Mikulas Patocka > > > > I was too quick to acknowledge this patchset. It doesn't work. > > > > This patchset fixes the crash, but it introduces another bug - when I > > type > > 'reboot' on the console, it prints 'INIT: Switching to runlevel: 6' > > and > > then it gets stuck for 80 seconds before proceeding with the reboot. > > When > > I revert this patchset 'reboot' reboots the machine without any > > delay. > > This bug was reproduced on Debian 5 userspace on pa-risc. > > Thanks much for the testing, Mikulas. > Could you try to bisect which of the patches causes it? > The most important are 1,2,3 - probably, one of them caused it.. > I'll stare a bit into the code. The patch 3 causes it. The hangs during reboot take either 80 seconds, 3 minutes or 3:25. Mikulas