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 DF37BC433E0 for ; Thu, 28 May 2020 07:19:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B4D3620899 for ; Thu, 28 May 2020 07:19:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590650350; bh=i4gLl3Zg5BTNEIw4sQrPxMbPNWXZA+6V96OThYcUN14=; h=Subject:To:From:Date:List-ID:From; b=Irrc1uzoSaN+t2C1zdj8OhTiGet2V5Iqm59K3+2MROASpgNWotZiCHz+cRdKn6DbN s2XchgHw+NtJICB4e099ZzWoCK4/72GnkO+z6Mwz/zfVT8yOqJXh7kdKRjdWpu3a1o VW1uaySnalDCgSD3eFxgbL5tETDuCDlgm1IcOa2E= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725747AbgE1HTK (ORCPT ); Thu, 28 May 2020 03:19:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:40150 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725601AbgE1HTJ (ORCPT ); Thu, 28 May 2020 03:19:09 -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 C2F71207D3; Thu, 28 May 2020 07:19:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590650349; bh=i4gLl3Zg5BTNEIw4sQrPxMbPNWXZA+6V96OThYcUN14=; h=Subject:To:From:Date:From; b=UJnEk6CpIMV7jwGmfD5XwuuGxvLMuPV1KTUanPZhZ+Skyzkvgvl7TjpJpeOzzzpQv HVbveB1xf3SWpTuTktbn2fv6IYAMx5Qkj47lXEo4HzN9jX6d++738bQt+5veaDsaE8 v3BWrFkCzKn8T91NXjPez9suyus96fVs8jUoy4Nw= Subject: patch "serial: imx: Initialize lock for non-registered console" added to tty-next To: andriy.shevchenko@linux.intel.com, gregkh@linuxfoundation.org, linux@roeck-us.net, stable@vger.kernel.org From: Date: Thu, 28 May 2020 09:19:07 +0200 Message-ID: <159065034721114@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-next 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 also be merged in the next major kernel release during the merge window. 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