Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2214061imm; Mon, 3 Sep 2018 23:32:18 -0700 (PDT) X-Google-Smtp-Source: ANB0VdavDS4UYew7dlvJeS/Iphi02qdbWGvrnCQcRHwEtYuEcUeZuxsko61T2njcl8zL/WQtonwl X-Received: by 2002:a63:f043:: with SMTP id s3-v6mr28871218pgj.94.1536042738702; Mon, 03 Sep 2018 23:32:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536042738; cv=none; d=google.com; s=arc-20160816; b=DBcgR28UZh6NIUStTiEVZ+OToduxeYzItRegLFhtrIF+ed2Ue2EgrfjZZOmKGTg1H5 scdNhe/Wp12LCtesKmcTL4TS9XVP7BKNPtKSpo+iXlZ39ZutmEz4+6iqYpOIW6/hmtEI /SReU5GVOUceYTjkLH5ILVJfxOu6Tw9hbjFGqNZKvEeDjyWfFzAT7VyCoo+YxKmIT5eZ syGXd8QsQaxPIZ6vh83x2Qvb21A42N3MhoX9jxkWiA1xC951JeNatTeLG497gtwMKtZ8 TcIja8jNRWws9ILmFTF+YmCT7UnjaCp+fFLk5nEVB7Py9evi8RCHQgphXBxd10ovNhUZ hjAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:cc:to:subject :arc-authentication-results; bh=ST98tTJ1vfKmBeHShsV9vfwlwt2lYmIcYi9yFeCp9H4=; b=SEBwQR85Ei+Cb59Lc1lddOElcfQBfAoFMWoX9MnhAL5YZb9nIGdo31f0Qtz9yM115j dB9ufcBhEsRqCg4DDylfCk7KN/qe9VEDwgmafmaSSXEkQ29I0re95ysgEegHI+095ajA PAfxE5U7o3T8+NcusZa49k/mnWnB9/AX+LfUO3tmpf07UPdhJAksHqcL/7ylXWMMDUYP ktfeOwPcmKMudKkvjTu/SO3ua8TAGZUF4VcOO/OVdsDZPy2e+4eb5VUmo2f2MimOtcU+ nW7S4rpBphrYxyRy4FIr++eU8KyAD2KTYYRZWxzq6MSyWWb6arMx7y4maHOjSxJBxw5j q8eA== 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 i8-v6si19596540pfo.128.2018.09.03.23.32.02; Mon, 03 Sep 2018 23:32:18 -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 S1727485AbeIDKyg (ORCPT + 99 others); Tue, 4 Sep 2018 06:54:36 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:39897 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726011AbeIDKyf (ORCPT ); Tue, 4 Sep 2018 06:54:35 -0400 Received: by mail-wm0-f66.google.com with SMTP id q8-v6so3017187wmq.4; Mon, 03 Sep 2018 23:30:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=ST98tTJ1vfKmBeHShsV9vfwlwt2lYmIcYi9yFeCp9H4=; b=bcR50NVnw/hQLDRsWFN/Rf0WFfbG5Re/askksX+cDmSYhs8oqRd3GeMapEV9RyZ3lr zHJOsWvrLuoGDdFB5eb/MByB1ppms0Y6+RFPYshZtXRkm8UQO3Htdn/ukmzlAlNR/+yd +vvvAXLB588uEIgQ1gWzt435rFL40H3VogpMiYjhH3RdWHbbXoh/LSJG8Fn/VChlP7Vf r4eXYHELJrUtSlNNhWgxdJA77RrMDLMb8wYUFhB+PCtGxWpzrhSu7LXCey8GbHNfbMEU l7zRrlXrD34Y7BRBbtCqxnr+SjU4wRZWT2NhwWDOaJVRAGQNa1bwgV8ipzge/THwN6nV O9aA== X-Gm-Message-State: APzg51CofJe0zg2S5gKAUPi4sIA7HdHT36bSGYeay03JJ4qobQUGInGt d5FlsPznInuUO5Mo1R4wjvhzhpnG X-Received: by 2002:a1c:908b:: with SMTP id s133-v6mr1664934wmd.69.1536042652819; Mon, 03 Sep 2018 23:30:52 -0700 (PDT) Received: from ?IPv6:2a01:4240:2e27:ad85:aaaa::70f? ([2a01:4240:2e27:ad85:aaaa::70f]) by smtp.gmail.com with ESMTPSA id o15-v6sm17610338wru.23.2018.09.03.23.30.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Sep 2018 23:30:52 -0700 (PDT) Subject: Re: [PATCHv2 2/4] tty: Hold tty_ldisc_lock() during tty_reopen() To: Sergey Senozhatsky , Dmitry Safonov Cc: linux-kernel@vger.kernel.org, Dmitry Safonov <0x7f454c46@gmail.com>, Daniel Axtens , Dmitry Vyukov , Michael Neuling , Mikulas Patocka , Nathan March , =?UTF-8?B?UGFzaSBLw6Rya2vDpGluZW4=?= , Peter Hurley , Tan Xiaojun , Tetsuo Handa , syzbot+3aa9784721dfb90e984d@syzkaller.appspotmail.com, Greg Kroah-Hartman , stable@vger.kernel.org References: <20180903165257.29227-1-dima@arista.com> <20180903165257.29227-3-dima@arista.com> <20180904015139.GA4251@jagdpanzerIV> From: Jiri Slaby Openpgp: preference=signencrypt Autocrypt: addr=jslaby@suse.com; prefer-encrypt=mutual; keydata= xsFNBE6S54YBEACzzjLwDUbU5elY4GTg/NdotjA0jyyJtYI86wdKra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z2ZPk2D53Ww39VNI/J9ABEBAAHCwV8EGAECAAkF Ak6S54YCGwwACgkQvSWxBAa0cEk3tRAAgO+DFpbyIa4RlnfpcW17AfnpZi9VR5+zr496n2jH /1ldwRO/S+QNSA8qdABqMb9WI4BNaoANgcg0AS429Mq0taaWKkAjkkGAT7mD1Q5PiLr06Y/+ Kzdr90eUVneqM2TUQQbK+Kh7JwmGVrRGNqQrDk+gRNvKnGwFNeTkTKtJ0P8jYd7P1gZb9Fwj 9YLxjhn/sVIhNmEBLBoI7PL+9fbILqJPHgAwW35rpnq4f/EYTykbk1sa13Tav6btJ+4QOgbc ezWIwZ5w/JVfEJW9JXp3BFAVzRQ5nVrrLDAJZ8Y5ioWcm99JtSIIxXxt9FJaGc1Bgsi5K/+d yTKLwLMJgiBzbVx8G+fCJJ9YtlNOPWhbKPlrQ8+AY52Aagi9WNhe6XfJdh5g6ptiOILm330m kR4gW6nEgZVyIyTq3ekOuruftWL99qpP5zi+eNrMmLRQx9iecDNgFr342R9bTDlb1TLuRb+/ tJ98f/bIWIr0cqQmqQ33FgRhrG1+Xml6UXyJ2jExmlO8JljuOGeXYh6ZkIEyzqzffzBLXZCu jlYQDFXpyMNVJ2ZwPmX2mWEoYuaBU0JN7wM+/zWgOf2zRwhEuD3A2cO2PxoiIfyUEfB9SSmf faK/S4xXoB6wvGENZ85Hg37C7WDNdaAt6Xh2uQIly5grkgvWppkNy4ZHxE+jeNsU7tg= Message-ID: <7e62b122-3b9e-dc46-d99f-9055bb67d670@suse.com> Date: Tue, 4 Sep 2018 08:30:50 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180904015139.GA4251@jagdpanzerIV> Content-Type: text/plain; charset=iso-8859-2 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/04/2018, 03:51 AM, Sergey Senozhatsky wrote: > On (09/03/18 17:52), Dmitry Safonov wrote: >> >> We've seen the following crash on v4.9.108 stable: >> >> BUG: unable to handle kernel paging request at 0000000000002260 >> IP: [..] n_tty_receive_buf_common+0x5f/0x86d >> Workqueue: events_unbound flush_to_ldisc >> Call Trace: >> [..] n_tty_receive_buf2 >> [..] tty_ldisc_receive_buf >> [..] flush_to_ldisc >> [..] process_one_work >> [..] worker_thread >> [..] kthread >> [..] ret_from_fork >> >> tty_ldisc_reinit() should be called with ldisc_sem hold for writing, >> which will protect any reader against line discipline changes. >> >> Cc: Greg Kroah-Hartman >> Cc: Jiri Slaby >> Cc: stable@vger.kernel.org # depends on commit b027e2298bd5 ("tty: fix >> data race between tty_init_dev and flush of buf") > > I believe there's a "Fixes" tag for that > > Fixes: b027e2298bd5 ("tty: fix data race between tty_init_dev and flush of buf") > Cc: stable@vger.kernel.org Nope, it would be translated as: Backport-first: b027e2298bd5 :) thanks, -- js suse labs