mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Taichi Kageyama <t-kageyama@cp.jp.nec.com>
Cc: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"peter@hurleysoftware.com" <peter@hurleysoftware.com>,
	"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"jslaby@suse.cz" <jslaby@suse.cz>,
	"prarit@redhat.com" <prarit@redhat.com>,
	Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
	"jiang.liu@linux.intel.com" <jiang.liu@linux.intel.com>
Subject: Re: [PATCH v4] serial: 8250: Fix autoconfig_irq() to avoid race conditions
Date: Mon, 17 Aug 2015 21:22:48 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.11.1508172122250.3873@nanos> (raw)
In-Reply-To: <1439779518-31560-1-git-send-email-t-kageyama@cp.jp.nec.com>

On Mon, 17 Aug 2015, Taichi Kageyama wrote:
> diff --git tty-next.org/drivers/tty/serial/8250/8250_port.c tty-next.work/drivers/tty/serial/8250/8250_port.c
> index 54e6c8d..9300b59 100644
> --- tty-next.org/drivers/tty/serial/8250/8250_port.c
> +++ tty-next.work/drivers/tty/serial/8250/8250_port.c
> @@ -1238,6 +1238,9 @@ static void autoconfig_irq(struct uart_8250_port *up)
>  		inb_p(ICP);
>  	}
>  
> +	if (uart_console(port))
> +		console_lock();
> +
>  	/* forget possible initially masked and pending IRQ */
>  	probe_irq_off(probe_irq_on());
>  	save_mcr = serial_in(up, UART_MCR);
> @@ -1269,6 +1272,9 @@ static void autoconfig_irq(struct uart_8250_port *up)
>  	if (port->flags & UPF_FOURPORT)
>  		outb_p(save_ICP, ICP);
>  
> +	if (uart_console(port))
> +		console_unlock();
> +
>  	port->irq = (irq > 0) ? irq : 0;
>  }

Reviewed-by: Thomas Gleixner <tglx@linutronix.de>

      reply	other threads:[~2015-08-17 19:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-17  2:45 Taichi Kageyama
2015-08-17 19:22 ` Thomas Gleixner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.11.1508172122250.3873@nanos \
    --to=tglx@linutronix.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=jiang.liu@linux.intel.com \
    --cc=jslaby@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=n-horiguchi@ah.jp.nec.com \
    --cc=peter@hurleysoftware.com \
    --cc=prarit@redhat.com \
    --cc=t-kageyama@cp.jp.nec.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®