From: Arnd Bergmann <arnd@arndb.de>
To: Jiri Slaby <jslaby@suse.cz>
Cc: gregkh@suse.de, alan@linux.intel.com,
linux-serial@vger.kernel.org, jirislaby@gmail.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/5] TTY: serial, use ASYNCB_CLOSING in uart_close
Date: Thu, 25 Aug 2011 17:15:01 +0200 [thread overview]
Message-ID: <201108251715.01443.arnd@arndb.de> (raw)
In-Reply-To: <1314277928-13388-1-git-send-email-jslaby@suse.cz>
On Thursday 25 August 2011, Jiri Slaby wrote:
>
> We need to move port->mutex locking after wait_until_sent in
> uart_close (for rationale see next patches). But if we did it now, we
> would introduce a race between close and open. This is exactly why
> port->mutex is locked at the top of uart_close.
>
> To avoid the race, we add ASYNCB_CLOSING to uart_close. Like every
> other sane TTY driver. Thanks to tty_port_block_til_ready used in
> uart_open we will have this for free. Then we can move the port->mutex
> lock.
>
> Also note that this will make the conversion to tty_port helpers
> easier. They are currently handling ASYNC_CLOSING flag correctly.
>
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
The series looks good to me,
Acked-by: Arnd Bergmann <arnd@arndb.de>
The only thing left to note is probably that there are a bunch
of drivers that implement their own *_wait_until_sent function
and call that from their *_close function instead of calling
tty_wait_until_sent. These drivers continue to suffer from the
same stalls that you are fixing the other ones.
Arnd
next prev parent reply other threads:[~2011-08-25 15:15 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <13141210141189@kroah.org>
2011-08-23 18:33 ` patch "TTY: remove tty_locked" added to tty tree Jiri Slaby
2011-08-23 18:46 ` Arnd Bergmann
2011-08-23 18:54 ` Jiri Slaby
2011-08-24 8:46 ` Arnd Bergmann
2011-08-24 9:31 ` Jiri Slaby
2011-08-24 11:20 ` Arnd Bergmann
2011-08-24 11:47 ` Jiri Slaby
2011-08-24 14:35 ` Arnd Bergmann
2011-08-24 21:27 ` Jiri Slaby
2011-08-24 21:27 ` Jiri Slaby
2011-08-24 21:42 ` Greg KH
2011-08-24 21:42 ` Greg KH
2011-08-24 21:48 ` Jiri Slaby
2011-08-24 21:54 ` Greg KH
2011-08-24 21:54 ` Greg KH
2011-08-24 21:48 ` Jiri Slaby
2011-08-25 13:12 ` [PATCH 1/5] TTY: serial, use ASYNCB_CLOSING in uart_close Jiri Slaby
2011-08-25 13:12 ` [PATCH 2/5] TTY: serial, move locking " Jiri Slaby
2011-08-25 13:12 ` [PATCH 3/5] TTY: define tty_wait_until_sent_from_close Jiri Slaby
2011-08-25 13:12 ` [PATCH 4/5] TTY: use tty_wait_until_sent_from_close in tty_port_close_start Jiri Slaby
2011-08-25 13:12 ` [PATCH 5/5] TTY: use tty_wait_until_sent_from_close in other drivers Jiri Slaby
2011-08-25 15:15 ` Arnd Bergmann [this message]
2011-08-24 14:35 ` patch "TTY: remove tty_locked" added to tty tree Arnd Bergmann
2011-08-24 15:53 ` Alan Cox
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=201108251715.01443.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=alan@linux.intel.com \
--cc=gregkh@suse.de \
--cc=jirislaby@gmail.com \
--cc=jslaby@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.