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=-11.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,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 C71AAC433E0 for ; Wed, 27 May 2020 08:58:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9CC7B2078C for ; Wed, 27 May 2020 08:58:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590569921; bh=DGj55yXUplHcXdWd7+KQTzEI6FsuoLs8iPypsUpw918=; h=Subject:To:From:Date:List-ID:From; b=BUEQaAP+/35+iB2RDE3/jt6c/21dD1vQ/kScA8eR+nAY1P3qvJnhKl7lp8KIeyoNU OVzz3Pn85Ud199fZgLNNlxHIfbhYDPxfmLDkEKomsH2oc989/7jehctj//nQCzgFeB xSRYGvsroHSqAqjIyUO54IcJ8Mwsj+5dCuiYqeX0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388394AbgE0I6k (ORCPT ); Wed, 27 May 2020 04:58:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:33934 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388387AbgE0I6k (ORCPT ); Wed, 27 May 2020 04:58:40 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 25BE720723; Wed, 27 May 2020 08:58:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590569919; bh=DGj55yXUplHcXdWd7+KQTzEI6FsuoLs8iPypsUpw918=; h=Subject:To:From:Date:From; b=kW/2Y9hYbNUMmz8d/uV+5i2ks/CbWC1Rk0kM9XXMW4i/YnUmLOgWiTovv7JqusKSa JHwvh8deKJ+3yeY5++JXoqGjsi9WaNYk7AGyHeT1sEPmAxbIhfsuN3dNWt78nL9Xe4 sC2SE88HEt5pAkCIMhH6IvAbs6sbpB935vu4wrdk= Subject: patch "serial: imx: Initialize lock for non-registered console" added to tty-testing To: andriy.shevchenko@linux.intel.com, gregkh@linuxfoundation.org, linux@roeck-us.net, stable@vger.kernel.org From: Date: Wed, 27 May 2020 10:58:37 +0200 Message-ID: <15905699174529@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 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 serial: imx: Initialize lock for non-registered console 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-testing 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 be merged to the tty-next branch sometime soon, after it passes testing, and the merge window is open. If you have any questions about this process, please let me know. >From 8f065acec7573672dd15916e31d1e9b2e785566c Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Mon, 25 May 2020 13:59:52 +0300 Subject: serial: imx: Initialize lock for non-registered console The commit a3cb39d258ef ("serial: core: Allow detach and attach serial device for console") changed a bit logic behind lock initialization since for most of the console driver it's supposed to have lock already initialized even if console is not enabled. However, it's not the case for Freescale IMX console. Initialize lock explicitly in the ->probe(). Note, there is still an open question should or shouldn't not this driver register console properly. Fixes: a3cb39d258ef ("serial: core: Allow detach and attach serial device for console") Reported-by: Guenter Roeck Cc: stable Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200525105952.13744-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/imx.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index 986d902fb7fe..6b078e395931 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -2404,6 +2404,9 @@ static int imx_uart_probe(struct platform_device *pdev) } } + /* We need to initialize lock even for non-registered console */ + spin_lock_init(&sport->port.lock); + imx_uart_ports[sport->port.line] = sport; platform_set_drvdata(pdev, sport); -- 2.26.2