From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D00FAE8FDCA for ; Wed, 4 Oct 2023 06:05:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232648AbjJDGFR (ORCPT ); Wed, 4 Oct 2023 02:05:17 -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: Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org 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