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=-10.9 required=3.0 tests=DATE_IN_PAST_03_06, 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 26461C43381 for ; Wed, 27 Mar 2019 18:27:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DE9A9206BA for ; Wed, 27 Mar 2019 18:27:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553711233; bh=+1uX0MxUGBOA2W3L2Z0egdjKYmiPDzHjXrfKxZkzPRU=; h=Subject:To:From:Date:List-ID:From; b=0rz49NzliV/NghRSHK/20UapwH3sF8bDDbVBRTyynYRZjQyCdfwPum9OS9Gxai34J 47kfpshlKq3avNejvrR/1mrqZBH3680TMcrgiqRdKXRLC8Yjns6B2k5CpVe1f1i8/2 CIMssSB776lOCUjge5zzs2FDKMgJ7VVaJtOm37ww= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391787AbfC0S1K (ORCPT ); Wed, 27 Mar 2019 14:27:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:47016 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388835AbfC0S1J (ORCPT ); Wed, 27 Mar 2019 14:27:09 -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 D0AFB20651; Wed, 27 Mar 2019 18:27:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553711229; bh=+1uX0MxUGBOA2W3L2Z0egdjKYmiPDzHjXrfKxZkzPRU=; h=Subject:To:From:Date:From; b=DhP3m8V4hgGAskAYXMUbmXTtigoJTsXzDNrXrUqP1XIzG+P+L8bJa9o+sjmPpoqcT qs+RG2w++3rjxFjZrQ02uZl4YPCz7V77Tv5BDfue67w26TpDVWy9yXG2ukdD/ViED7 XaCB4oWJoCsdHmT0Uzqm+NHsJgH14MZ1tLLdzXy4= 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:26:38 +0900 Message-ID: <155370039815498@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 d70fc79f67c7030fa35d2e1617a02eae6cafb454 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