Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2404183rdb; Tue, 3 Oct 2023 23:05:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGc+K2KtKlx2KuBguzYN8eBRKFTA18tsGeOp1s4holQKMgmPd7yi9XHB0CL6G8117qFbzv8 X-Received: by 2002:a17:90b:4f84:b0:271:addf:3c96 with SMTP id qe4-20020a17090b4f8400b00271addf3c96mr1256164pjb.46.1696399520051; Tue, 03 Oct 2023 23:05:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696399520; cv=none; d=google.com; s=arc-20160816; b=Ovst/9C+cxEszi70q7xQD5PxtEEuUUqR4ztG8wPjOGuin/OHBTlHTld88GzkuVlhaT YRgYenEfzyXv+cRL7FkczAxSvnRUOxgIbh+97dSOa5ljNbL7wv2RpjT59oboAtKjXTVE CBtgxsgepWPbmVBh2PpedNrL2urjw12KyqUqzN1kYYkFPwvAmlHLQIqQh3JgkUo2Twb6 QLd04PRs/xrSi6MtM31BHEmaCTzzGkZqJzhtOzC98uPxZJzs7i5wgwwubn2AdJ24zl6M K+MYhgp8o2E83VPMqhFudrqGACLyWWIPtlTxHrEI4KzrAN1npLoAD5vC4C9BNpXslwzo 3wGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=TSlhkkmmfRn/RA0lCDsd1ov6Yg+g28t/4zXPjuRTq88=; fh=UHH2CUh+6+HVtJX5/x2LQT3oSjCW/qACY6x9nzl97iY=; b=Gi0F+6NwT3twsQ71xs5PsNkxkuPC3MpTq412hY2pyfNfSP1e+edZbdSt2PP1cY3lF+ fctqj5hPGEXa2fW+fM2JDkFkvNcfi/0LC1rB2rtMIIMKAKb1pcaUqQ332Z2qu8D0Ys0A iKj6BSEJqXbvinNhsA8rYaI9oeOjMXoIK8N+aeRPrDLLXIvoIdT3FpqIKfRmQCIpnqNq oIetTbS49zi+Arnp1hsWBc0/IG+jl/osI7pamh6aQ3N16UI/Rl7NDF7D6m083F00tCzl bOVhJ0Kud25FH1Ia/Jq0WjGFnjhlxmxj+Eh6rHJwUMj6zph0IZTEXexzMrmPYyYFMkgh uxbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=GlZwdsxF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id e9-20020a170902cf4900b001b8c824e826si2893999plg.533.2023.10.03.23.05.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 23:05:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=GlZwdsxF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 015E78328AD3; Tue, 3 Oct 2023 23:05:19 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232767AbjJDGFS (ORCPT + 99 others); Wed, 4 Oct 2023 02:05:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48178 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232537AbjJDGFR (ORCPT ); Wed, 4 Oct 2023 02:05:17 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9834CA7; Tue, 3 Oct 2023 23:05:13 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DA188C433C8; Wed, 4 Oct 2023 06:05:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1696399513; bh=YPjhyhXTHc/JSPJaMPXxVEW44XmFbXt6asYBrVFetjc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=GlZwdsxFs9UMZfcMpU6G97Yr5hUUr005ha3ia1L5hCHOEX1++ZoHT2PJ9zzSzAUg2 jsQYHAMnLCi2djAal5jDWydHI187M2ygPvvwNhfEZ95AWZOAMbSQn+JFDEfxWowI01 R57xSqrWXE78rJ5e6ZEfvZoU6VFdhZNopsNioEXk= Date: Wed, 4 Oct 2023 08:05:11 +0200 From: Greg Kroah-Hartman To: "Starke, Daniel" Cc: Lee Jones , "linux-kernel@vger.kernel.org" , Fedor Pchelkin , Jiri Slaby , "linux-serial@vger.kernel.org" , "syzbot+5f47a8cea6a12b77a876@syzkaller.appspotmail.com" Subject: Re: [PATCH 1/1] tty: n_gsm: Avoid sleeping during .write() whilst atomic Message-ID: <2023100421-negotiate-stammer-1b35@gregkh> References: <20231003170020.830242-1-lee@kernel.org> <2023100320-immorally-outboard-573a@gregkh> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 03 Oct 2023 23:05:19 -0700 (PDT) On Wed, Oct 04, 2023 at 05:59:09AM +0000, Starke, Daniel wrote: > > Daniel, any thoughts? > > Our application of this protocol is only with specific modems to enable > circuit switched operation (handling calls, selecting/querying networks, > etc.) while doing packet switched communication (i.e. IP traffic over PPP). > The protocol was developed for such use cases. > > Regarding the issue itself: > There was already an attempt to fix all this by switching from spinlocks to > mutexes resulting in ~20% performance loss. However, the patch was reverted > as it did not handle the T1 timer leading into sleep during atomic within > gsm_dlci_t1() on every mutex lock there. > There was also a suggestion to fix this in do_con_write() as > tty_operations::write() appears to be documented as "not allowed to sleep". > The patch for this was rejected. It did not fix the issue within n_gsm. > > Link: https://lore.kernel.org/all/20221203215518.8150-1-pchelkin@ispras.ru/ > Link: https://lore.kernel.org/all/20221212023530.2498025-1-zengheng4@huawei.com/ > Link: https://lore.kernel.org/all/5a994a13-d1f2-87a8-09e4-a877e65ed166@kernel.org/ Ok, I thought I remembered this, I'll just drop this patch from my review queue and wait for a better solution if it ever comes up as this isn't a real issue that people are seeing on actual systems, but just a syzbot report. thanks, greg k-h