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 X-Spam-Level: X-Spam-Status: No, score=-12.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 28B6EC10F00 for ; Wed, 27 Mar 2019 18:27:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F09C8206BA for ; Wed, 27 Mar 2019 18:27:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553711247; bh=6Ftf2221+dqBB0dFisJh3V8YVFeUEf0DbQ22lAWretE=; h=Subject:To:From:Date:List-ID:From; b=1+Z7oA57U3W/1naHihQ5LkffIUzIbNe7ost4wj4DlD0A5nsRW20Dm05FtzrNist6x 1XGu+24EyrpeC/rcX8k6kNWARnhQRIo2k7fPwvgpzQTAz42UW3PGgZkPETjgWVNLe7 dElIcYqqsaU0bq8natYOgCJTP6hFEyYwiC0UP7pU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391604AbfC0S1Z (ORCPT ); Wed, 27 Mar 2019 14:27:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:47250 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391267AbfC0S1Y (ORCPT ); Wed, 27 Mar 2019 14:27:24 -0400 Received: from localhost (unknown [88.128.80.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3578C2063F; Wed, 27 Mar 2019 18:27:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553711243; bh=6Ftf2221+dqBB0dFisJh3V8YVFeUEf0DbQ22lAWretE=; h=Subject:To:From:Date:From; b=xKvQN9fdy8btwFeUNz4ZwP7rAFSYncGl/ajYmn9ZuQGFaql7Ayw4/Ol6C6vKimaWo FeWzT93cSQiAPR8BtiIEma8hah47EZptzvS4rArljr9+cmQpprdaqoRJM+E9cSUyWf 5HNP4tfpNIykuENOiKR9P2wjH2dJZh16EcKh26RE= Subject: patch "Disable kgdboc failed by echo space to" added to tty-linus To: witallwang@gmail.com, daniel.thompson@linaro.org, gregkh@linuxfoundation.org, stable@vger.kernel.org From: Date: Thu, 28 Mar 2019 00:27:54 +0900 Message-ID: <1553700474193177@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org This is a note to let you know that I've just added the patch titled Disable kgdboc failed by echo space to to my tty git tree which can be found at git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git in the tty-linus branch. The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.) The patch will hopefully also be merged in Linus's tree for the next -rc kernel release. If you have any questions about this process, please let me know. >From 3ec8002951ea173e24b466df1ea98c56b7920e63 Mon Sep 17 00:00:00 2001 From: Wentao Wang Date: Wed, 20 Mar 2019 15:30:39 +0000 Subject: Disable kgdboc failed by echo space to /sys/module/kgdboc/parameters/kgdboc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Echo "" to /sys/module/kgdboc/parameters/kgdboc will fail with "No such deviceā€ error. This is caused by function "configure_kgdboc" who init err to ENODEV when the config is empty (legal input) the code go out with ENODEV returned. Fixes: 2dd453168643 ("kgdboc: Fix restrict error") Signed-off-by: Wentao Wang Cc: stable Acked-by: Daniel Thompson Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/kgdboc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/kgdboc.c b/drivers/tty/serial/kgdboc.c index 6fb312e7af71..bfe5e9e034ec 100644 --- a/drivers/tty/serial/kgdboc.c +++ b/drivers/tty/serial/kgdboc.c @@ -148,8 +148,10 @@ static int configure_kgdboc(void) char *cptr = config; struct console *cons; - if (!strlen(config) || isspace(config[0])) + if (!strlen(config) || isspace(config[0])) { + err = 0; goto noconfig; + } kgdboc_io_ops.is_console = 0; kgdb_tty_driver = NULL; -- 2.21.0