From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Greg KH <greg@kroah•com>, Thomas Gleixner <tglx@linutronix•de>,
Ingo Molnar <mingo@elte•hu>, "H. Peter Anvin" <hpa@zytor•com>,
Peter Zijlstra <peterz@infradead•org>
Cc: linux-next@vger•kernel.org, linux-kernel@vger•kernel.org
Subject: linux-next: manual merge of the tty tree with the tip tree
Date: Mon, 10 Nov 2014 15:46:21 +1100 [thread overview]
Message-ID: <20141110154621.3adab2e4@canb.auug.org.au> (raw)
[-- Attachment #1: Type: text/plain, Size: 2393 bytes --]
Hi Greg,
Today's linux-next merge of the tty tree got a conflict in
drivers/tty/n_tty.c between commit 97d9e28d1a27 ("sched, tty: Deal with
nested sleeps") from the tip tree and commits 1aa1bf111527 ("tty: Fix
missed wakeup from packet mode status update") and 52bce7f8d4fc ("pty,
n_tty: Simplify input processing on final close") from the tty tree.
I fixed it up (I hope - see below) and can carry the fix as necessary
(no action is required).
--
Cheers,
Stephen Rothwell sfr@canb•auug.org.au
diff --cc drivers/tty/n_tty.c
index 26f097f60b10,112eda7c56bc..000000000000
--- a/drivers/tty/n_tty.c
+++ b/drivers/tty/n_tty.c
@@@ -2193,46 -2197,30 +2192,30 @@@ static ssize_t n_tty_read(struct tty_st
if (!input_available_p(tty, 0)) {
if (test_bit(TTY_OTHER_CLOSED, &tty->flags)) {
- up_read(&tty->termios_rwsem);
- tty_flush_to_ldisc(tty);
- down_read(&tty->termios_rwsem);
- if (!input_available_p(tty, 0)) {
- retval = -EIO;
- break;
- }
- } else {
- if (tty_hung_up_p(file))
- break;
- if (!timeout)
- break;
- if (file->f_flags & O_NONBLOCK) {
- retval = -EAGAIN;
- break;
- }
- if (signal_pending(current)) {
- retval = -ERESTARTSYS;
- break;
- }
- n_tty_set_room(tty);
- up_read(&tty->termios_rwsem);
-
- timeout = wait_woken(&wait, TASK_INTERRUPTIBLE,
- timeout);
-
- down_read(&tty->termios_rwsem);
- continue;
+ retval = -EIO;
+ break;
}
- }
-
- /* Deal with packet mode. */
- if (packet && b == buf) {
- if (tty_put_user(tty, TIOCPKT_DATA, b++)) {
- retval = -EFAULT;
- b--;
+ if (tty_hung_up_p(file))
+ break;
+ if (!timeout)
+ break;
+ if (file->f_flags & O_NONBLOCK) {
+ retval = -EAGAIN;
break;
}
- nr--;
+ if (signal_pending(current)) {
+ retval = -ERESTARTSYS;
+ break;
+ }
+ n_tty_set_room(tty);
+ up_read(&tty->termios_rwsem);
+
- timeout = schedule_timeout(timeout);
++ timeout = wait_woken(&wait, TASK_INTERRUPTIBLE,
++ timeout);
+
+ down_read(&tty->termios_rwsem);
+ continue;
}
- __set_current_state(TASK_RUNNING);
if (ldata->icanon && !L_EXTPROC(tty)) {
retval = canon_copy_from_read_buf(tty, &b, &nr);
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
reply other threads:[~2014-11-10 4:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20141110154621.3adab2e4@canb.auug.org.au \
--to=sfr@canb$(echo .)auug.org.au \
--cc=greg@kroah$(echo .)com \
--cc=hpa@zytor$(echo .)com \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=mingo@elte$(echo .)hu \
--cc=peterz@infradead$(echo .)org \
--cc=tglx@linutronix$(echo .)de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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