Skip to content

ldsem patchset, reordered and rebased

Peter Hurley linux-serial lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6tty: Fix tty_ldisc_lock name collisiondrivers/tty/tty_io.c drivers/tty/tty_ldisc.c+25 -250 replies
2/6tty: Add lock/unlock ldisc pair functionsdrivers/tty/tty_ldisc.c+87 -00 replies
3/6tty: Replace ldisc locking with ldisc_semdrivers/tty/tty_buffer.c drivers/tty/tty_io.c drivers/tty/tty_ldisc.c +2 more+52 -2930 replies
4/6tty: Clarify ldisc variabledrivers/tty/tty_ldisc.c+7 -70 replies
5/6tty: Fix hangup race with TIOCSETD ioctldrivers/tty/tty_ldisc.c+2 -40 replies
6/6tty: Clarify multiple-references comment in TIOCSETD ioctldrivers/tty/tty_ldisc.c+6 -40 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/6] ldsem patchset, reordered and rebased
Quoted 24 lines · Peter Hurley
Quoted 24 lines · Greg Kroah-Hartman
Quoted 23 lines · Peter Hurley
Quoted 21 lines · Greg Kroah-Hartman
Quoted 11 lines · Peter Hurley
Quoted 8 lines

Just as the tty pair must be locked in a stable sequence (ie, independent of which is consider the 'other' tty), so must the ldisc pair be locked in a stable sequence as well.

---
  drivers/tty/tty_ldisc.c | 87 +++++++++++++++++++++++++++++++++++++++++++++++++
  1 file changed, 87 insertions(+)

This patch breaks the build :(

Sorry about that.

Quoted 3 lines

I've taken the first one, care to mush this one with the 7/7 patch, so there are no build breaks, and resend the 5 resulting patches so I can apply these?

Maybe it would be better to reorder 7/7 to be 1/6, if that's ok? More work for me but the history will be cleaner.

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

Sure, that works for me as well, care to just resend them? Or, I can dig them out of my archive if needed.

I'll resend them because the rebase will require some re-editing.

Did you ever resend these? If so, I didn't see them :(

Greg,

Sorry for the delay here. In addition to the re-editing required, I merged in a couple of fixes and these needed re-testing.

These apply cleanly to tty-next.

Changes from previous 7-patch series:
1. In tty_ldisc_ref(), snapshot tty->ldisc holding ldsem. The conditions for this to be a fix cannot actually occur but this is better anyway.
2. In tty_set_ldisc(), the new ldisc needs to be released if tty_ldisc_lock_pair_timeout() fails.

Regards,
Peter Hurley

Peter Hurley (6):
tty: Fix tty_ldisc_lock name collision
tty: Add lock/unlock ldisc pair functions
tty: Replace ldisc locking with ldisc_sem
tty: Clarify ldisc variable
tty: Fix hangup race with TIOCSETD ioctl
tty: Clarify multiple-references comment in TIOCSETD ioctl

 drivers/tty/tty_buffer.c  |   2 +-
 drivers/tty/tty_io.c      |  11 +-
 drivers/tty/tty_ldisc.c   | 450 ++++++++++++++++------------------------------
 include/linux/tty.h       |   4 +-
 include/linux/tty_ldisc.h |   3 +-
 5 files changed, 158 insertions(+), 312 deletions(-)
Signature · 1 line
1.8.1.2