Received: by 10.213.65.68 with SMTP id h4csp469010imn; Fri, 16 Mar 2018 08:41:31 -0700 (PDT) X-Google-Smtp-Source: AG47ELuRUY9AVvUf/QAakbOVmsd7Xz1+I0C9ljmCLRoOotQ6ZnrDsfOhbzt6DSj5Ih9qVUTAqGrP X-Received: by 2002:a17:902:2803:: with SMTP id e3-v6mr2681435plb.238.1521214891357; Fri, 16 Mar 2018 08:41:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521214891; cv=none; d=google.com; s=arc-20160816; b=zEeSCtb0J7XjQnSnjkh3mh7oGdtiZgHfq0487nonIfIGT6Jpzt7+l3sSRBTlldD/a2 EyP5ZWVDtRKymr50D4cZwlK4nf9ldGFtz5ZROv/5hFJfOtM06FhKT6jPiuLOVKtOMNEe q15GiKGtVL4gNcBQUhCFq4dzuiI4SyR8LWcq83funo6nlqVDNaeb/5jY/Zoj21gZXPPx Ug7tVl0psfKYwYBolH7nl2BmgISc2FZ9kt9dHbDadR0ObZVNN7XJ2bw1BD7HRhLWJXP4 NNnz4tLuQFnym5VpYQFpOgiyG4y98mhgr5n4qT30n7UI1yJRGD2JXMS6ZCRHKYCN8WQd 7Heg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=aUpYOKc6Gf7Vf0oKbIX/2vleg5rC2JWK6UMcopnwZGA=; b=sWMxE83T3NY1Znj55xvQdCy+XkSdAjHEMIk7XD9NJmi/+aF15iIcYUCewWit3kLW3r fDl5OebeaSjGpElvK4Qy4yXSC94ky/b6dMCe5rEyLF+1lHUnqmDHe45HtNzsijOZj6AZ WWhvYTRozqeqviWzJP3VZ+t2gUGHC8czoeTbX3GDI6J+JmFLoFutJpK7VAq4UWXyxfjO aycmy1fH7rXSGVbmi+OTM5YHL03qmC5R4TpRWF5FOnGn6Dgu/8pco4DIh6tHuONmqadA tmp9a5gFR0/BtbNAArcpxsSlciSuH8yJwarcE36bfMqoge49Tz27QDE/82tZHFzzSd8B MdDA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u63si2439898pgc.638.2018.03.16.08.41.16; Fri, 16 Mar 2018 08:41:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964977AbeCPPkB (ORCPT + 99 others); Fri, 16 Mar 2018 11:40:01 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:43418 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754648AbeCPPj5 (ORCPT ); Fri, 16 Mar 2018 11:39:57 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id D0AA2D4D; Fri, 16 Mar 2018 15:39:56 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nikola Ciprich , Sebastian Andrzej Siewior , Johan Hovold Subject: [PATCH 4.15 022/128] serial: core: mark port as initialized in autoconfig Date: Fri, 16 Mar 2018 16:22:43 +0100 Message-Id: <20180316152337.591610913@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180316152336.199007505@linuxfoundation.org> References: <20180316152336.199007505@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Sebastian Andrzej Siewior commit 714569064adee3c114a2a6490735b94abe269068 upstream. This is a followup on 44117a1d1732 ("serial: core: mark port as initialized after successful IRQ change"). Nikola has been using autoconfig via setserial and reported a crash similar to what I fixed in the earlier mentioned commit. Here I do the same fixup for the autoconfig. I wasn't sure that this is the right approach. Nikola confirmed that it fixes his crash. Fixes: b3b576461864 ("tty: serial_core: convert uart_open to use tty_port_open") Link: http://lkml.kernel.org/r/20180131072000.GD1853@localhost.localdomain Reported-by: Nikola Ciprich Tested-by: Nikola Ciprich Cc: Signed-off-by: Sebastian Andrzej Siewior Tested-by: Nikola Ciprich Acked-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/serial_core.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c @@ -1144,6 +1144,8 @@ static int uart_do_autoconfig(struct tty uport->ops->config_port(uport, flags); ret = uart_startup(tty, state, 1); + if (ret == 0) + tty_port_set_initialized(port, true); if (ret > 0) ret = 0; }