Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp2962301rwe; Mon, 29 Aug 2022 03:34:48 -0700 (PDT) X-Google-Smtp-Source: AA6agR6k8tmpQsLnWPes5ep04qDdurzCu1B4YqmtK27nC4kWtUi7z4bbdBii5caXvS9GTtNGgijN X-Received: by 2002:a17:906:8a68:b0:741:56b2:af42 with SMTP id hy8-20020a1709068a6800b0074156b2af42mr5807330ejc.488.1661769287978; Mon, 29 Aug 2022 03:34:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661769287; cv=none; d=google.com; s=arc-20160816; b=Bdc2/Wm75V/qr620Ei3l89K4H0qhEd7dv1CIZ3xgV3/ts1tFXu8ar4f9o/bR0/JQ/5 VfLCIpOCi5LW9blFbsXSjFgC0smQv4wtWeXah2YXUzgJ+J5uRh+yu/gWmwuOYxdrlJQF D8XijdsBQ3ndndU8BWfYHhETdJ7kfmGYpKKBPlvD4k77Q7un1LKYOTcl6NsrtYZcsUH+ Gu+vN/gD8DREJiTLixhKYXGnz2x71f68axP71ZZgJtmjfhQUc2BbH6DZahKNyl33KeDF cTgZQU1ivdztGqjyj26hqe8Ele4i3OF+ZiGRn9zR4jIhs0Rn04jPsjdbdM+F/buXZ5y/ OLRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=uiDEAc36fw1oVBz2RndBdLuRw9KgMIJyJTG6rMfsFiE=; b=H4uKIl5U87SbvKLe88K+nc8XisR9KQnOiFmmCdEMFdVO2GM7fZMzBOwI1vCYCYnN1u ZUMLGRZ5wTRB6hTTk1KufG7Ic18VnqJzeV/bnsFCMZCCxlMxW9xBedUJFghMmPgvnB0I G4NEWOhcGBBI3yMU5TdXrxVN0T5SQMzdZJ2hhc9YxT3rTJ7SOHHTpjTYjUc4shXpeWxU krMye6TNNDkGtY3TjnvABgAs/NsFTNIHGL9JoUNwS/Wrag4y//1cghlds/18g9owM0b5 1+UDgz8dWKzDHtJ0lP3DzStbpb7+GgCKltWrsAKqnAGq/OeJ6s8LcAFFwuZ3uK5hhX5b McPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PzU2TQVv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y13-20020a056402358d00b0043d281cfe2bsi8754152edc.481.2022.08.29.03.34.22; Mon, 29 Aug 2022 03:34:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PzU2TQVv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229751AbiH2KMB (ORCPT + 99 others); Mon, 29 Aug 2022 06:12:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229932AbiH2KLf (ORCPT ); Mon, 29 Aug 2022 06:11:35 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3ED8B4E636 for ; Mon, 29 Aug 2022 03:11:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1661767891; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uiDEAc36fw1oVBz2RndBdLuRw9KgMIJyJTG6rMfsFiE=; b=PzU2TQVvFPvSO9HNXEL/ln2rwSzIV6jfN0MhjQiIiiEJDy8XwOzSk+b4VYW3kKWpM8u7nz gD07736G64Q+Fgwq9YT5e9YnzqFVfqdIHwXCcuUtEufadkx0lh6sOhfE9G4sAum+tf07/+ q7TONg9U0qhPziMUhI4tz42BU8/dARQ= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-590-1TV9i-VUOP2pUPoIQKPDyA-1; Mon, 29 Aug 2022 06:11:30 -0400 X-MC-Unique: 1TV9i-VUOP2pUPoIQKPDyA-1 Received: by mail-ej1-f71.google.com with SMTP id hr32-20020a1709073fa000b00730a39f36ddso2067905ejc.5 for ; Mon, 29 Aug 2022 03:11:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc; bh=uiDEAc36fw1oVBz2RndBdLuRw9KgMIJyJTG6rMfsFiE=; b=UpMu3W35BEmhtqs4zYuMHSu/QqkOHZV40O3ipg2cAhD1sm+U1A1jA3Yucoo+r8V4Oj l6C8DncBjdT/Qz02rfF0SFF/ZCG4sabMGbtCY8CXYxT/UK4mb0eWKufNWRqqMvTwD8gM U8IIQS+wY9CEWROqQLMqNCrubkDkao/yMp0jcpDEok4J3MclNhXcwalvZYL7BaBXE2JJ rKpzsMJBN/h+UZOJPj+7J50CaUKx5w9YVlck0O4EKCOCz45NnZwshdWlrRYeL9rbzI55 HIeTl9hV7ya+XvthxznybchbziYM58HCeGlVuCQUA9O15F71/pmKvebVGcgXNVUgnpkJ jGcg== X-Gm-Message-State: ACgBeo06tRcJ4a9OtiqWaWy+Nx1/UC0Bf89m9DaTOd5eYUN3pMyOkkqY MUrCQehkOz/UTmDlhhWil0ixSKAgYSSgK6KYVApGRJr5GZzZAgtDcVrf/SzqRz8o3Z/Z/3+lCXk V/FPYwxjlKuuycKEgJe2O8Ihh X-Received: by 2002:a17:906:2245:b0:715:7c81:e39d with SMTP id 5-20020a170906224500b007157c81e39dmr13664981ejr.262.1661767888267; Mon, 29 Aug 2022 03:11:28 -0700 (PDT) X-Received: by 2002:a17:906:2245:b0:715:7c81:e39d with SMTP id 5-20020a170906224500b007157c81e39dmr13664973ejr.262.1661767888059; Mon, 29 Aug 2022 03:11:28 -0700 (PDT) Received: from [10.40.98.142] ([78.108.130.194]) by smtp.gmail.com with ESMTPSA id ec14-20020a0564020d4e00b004483a543794sm3054189edb.96.2022.08.29.03.11.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 29 Aug 2022 03:11:27 -0700 (PDT) Message-ID: Date: Mon, 29 Aug 2022 12:11:27 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: 6.0 tty regression, NULL pointer deref in flush_to_ldisc Content-Language: en-US To: =?UTF-8?Q?Ilpo_J=c3=a4rvinen?= Cc: Greg Kroah-Hartman , Jiri Slaby , Linux Kernel Mailing List , Linux regressions mailing list References: <4b4bba5d-d291-d9fa-8382-cdc197b7ed35@redhat.com> From: Hans de Goede In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 8/29/22 11:36, Ilpo Järvinen wrote: > On Mon, 29 Aug 2022, Hans de Goede wrote: > >> Hi All, >> >> This weekend I noticed that on various Bay Trail based systems which have >> their bluetooth HCI connected over an uart (using hci_uart driver / >> using the drivers/tty/serial bus) there is a NULL pointer deref in >> flush_to_ldisc, see below for the full backtrace. >> >> I *suspect* that this is caused by commit 6bb6fa6908eb >> ("tty: Implement lookahead to process XON/XOFF timely"). >> >> I can cleanly revert this by reverting the following commits: >> >> ab24a01b2765 ("tty: Add closing marker into comment in tty_ldisc.h") >> 65534736d9a5 ("tty: Use flow-control char function on closing path") >> 6bb6fa6908eb ("tty: Implement lookahead to process XON/XOFF timely") >> >> ATM I don't have one of the affected systems handy. I will give >> a 6.0-rc3 kernel with these 3 commits reverted a try tonight (CEST) >> and I'll let you know the results. >> >> Note I can NOT confirm yet that these reverts fix things, so please >> don't revert anything yet. I just wanted to give people a headsup >> about this issue. >> >> Also maybe we can fix the new lookahead code instead of reverting. >> I would be happy to add a patch adding some debugging prints the >> systems run fine after the backtrace as long as I don't suspend them >> so gathering logs is easy. > > I guess this will help: > > https://lore.kernel.org/linux-kernel/20220818115026.2237893-1-vincent.whitchurch@axis.com/ Ah, yes that indeed looks like it should help. I'll give that a try tonight and report back the result. Regards, Hans