Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1863508rwb; Fri, 19 Aug 2022 10:38:29 -0700 (PDT) X-Google-Smtp-Source: AA6agR6bg8XQ3V8ooXqk83qwMROnG8aLaZesI4Xx2NZw/IqdhNzNc6q3rUDTniIOmGsQ5FkrJ//2 X-Received: by 2002:a63:2b02:0:b0:41d:9b5e:7d69 with SMTP id r2-20020a632b02000000b0041d9b5e7d69mr6954727pgr.165.1660930708838; Fri, 19 Aug 2022 10:38:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660930708; cv=none; d=google.com; s=arc-20160816; b=nbTEcWnJo2v1XF049nEVNHvg5QVGquUyTE9ynSt8AAaRgpKrGixD0MqaAwOi9CaboA lddQCiIBsYkshf9nWsu+hfo0gKt/ICrVnUzRzEI9JeCimngze9/6BPf6NgU6o0dPyAha 5tNYCkawgpv+TOKsLry9YIm0ufx1yIThHHFsd8TDVdwF1tk57BEkQx5DKU3hW9Y0RLFl EygjN8n6GhbxsdhgZVZ7dD8ni7V2AiXRgQezrjdC4SwhaK5fLI0Wb/0dHnAMiAzHTL7j HfXMNYKWvBdvrr6X/u2kbgX3VbSrv14CzCQQwfyjsGjkWdyQKyE4M/LC5rLSWIRjX8ld ctZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=QvIMYD3t+aHa+kGnP8vDXw8vhhviEJtOKC6tp+T6fvw=; b=YL4KP6YodQSRl48AKDqAmh8UfWIy1fMLs6xLwSJzEp2uuKn9PJ1FFAwUzk9zHMBanc DVtDcDSIx5me3E+8Kp00cSMQBfIf8U/ATFqoY2xYGqySShuyNQfMzuJ4jLHT0jP2VVgi zZMRY6XvLmS5qz0UrgC9hjZvU2hE1UuyIOH2OnUQMT2n5FBCXh+aEZx3nX1z7HIe0dpW jUuxxDJjGIW4/D+Zqlwsf1nkF9TS1yQxRlTzH6PdHrtSzw3Zzb7cpS22rtnYgcCa43cW UIXXsz8/pBqOGNoBHSgjTRdCCHDJShsFqSMjTVWuS91Xbaxc49Gwh5o1V7r82mwkOPqq MK1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=a0RCQ1jP; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j9-20020a056a00130900b00535bfefd390si4954296pfu.303.2022.08.19.10.38.17; Fri, 19 Aug 2022 10:38:28 -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=@linuxfoundation.org header.s=korg header.b=a0RCQ1jP; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353412AbiHSQfn (ORCPT + 99 others); Fri, 19 Aug 2022 12:35:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34780 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353560AbiHSQcA (ORCPT ); Fri, 19 Aug 2022 12:32:00 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E8E210D582; Fri, 19 Aug 2022 09:06:09 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 87152B82813; Fri, 19 Aug 2022 16:05:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D5DD3C433D7; Fri, 19 Aug 2022 16:05:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660925137; bh=it9LlY5KIiK5pR0xaKG2CPrcsLQV2KG1vQRlq1NABUc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=a0RCQ1jPNtUDtL6iKdGKBHUFOBONWtWE3w0bD4D6f2JCw4GWFrUW4h33Ap9AcISlB 07YJQEuULdkMShWM+2/Hc1x27q74QqqaxfPaLynXKgb8hg2Dvhq5qmhbe4Nm7GZyyi 1BxTPPMVIBj50ZeCE2hlGtJw7u+rUg50YHtmBuVU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Daniel Starke , Sasha Levin Subject: [PATCH 5.10 395/545] tty: n_gsm: fix DM command Date: Fri, 19 Aug 2022 17:42:45 +0200 Message-Id: <20220819153847.089036026@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220819153829.135562864@linuxfoundation.org> References: <20220819153829.135562864@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,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 From: Daniel Starke [ Upstream commit 18a948c7d90995d127785e308fa7b701df4c499f ] n_gsm is based on the 3GPP 07.010 and its newer version is the 3GPP 27.010. See https://portal.3gpp.org/desktopmodules/Specifications/SpecificationDetails.aspx?specificationId=1516 The changes from 07.010 to 27.010 are non-functional. Therefore, I refer to the newer 27.010 here. Chapter 5.3.3 defines the DM response. There exists no DM command. However, the current implementation incorrectly sends DM as command in case of unexpected UIH frames in gsm_queue(). Correct this behavior by always sending DM as response. Fixes: e1eaea46bb40 ("tty: n_gsm line discipline") Signed-off-by: Daniel Starke Link: https://lore.kernel.org/r/20220707113223.3685-2-daniel.starke@siemens.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/tty/n_gsm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c index 3f100f7abdb7..a6c0a1b76ddb 100644 --- a/drivers/tty/n_gsm.c +++ b/drivers/tty/n_gsm.c @@ -1938,7 +1938,7 @@ static void gsm_queue(struct gsm_mux *gsm) goto invalid; #endif if (dlci == NULL || dlci->state != DLCI_OPEN) { - gsm_command(gsm, address, DM|PF); + gsm_response(gsm, address, DM|PF); return; } dlci->data(dlci, gsm->buf, gsm->len); -- 2.35.1