[PATCH 00/16] tty: use lock, rpm, and free guards

Jiri Slaby (SUSE) posted 16 patches 1 month, 3 weeks ago
drivers/s390/char/con3270.c         |  18 +-
drivers/tty/mxser.c                 | 259 ++++++++++--------------
drivers/tty/serial/8250/8250.h      |   5 +
drivers/tty/serial/8250/8250_core.c |  91 ++++-----
drivers/tty/serial/8250/8250_omap.c | 145 ++++++--------
drivers/tty/serial/8250/8250_port.c | 298 ++++++++++++----------------
drivers/tty/serial/8250/8250_rsa.c  |   7 +-
drivers/tty/serial/serial_core.c    | 143 ++++++-------
drivers/tty/tty_port.c              | 168 +++++++---------
drivers/tty/vt/consolemap.c         | 116 +++++------
drivers/tty/vt/selection.c          |  20 +-
drivers/tty/vt/vc_screen.c          |  74 +++----
drivers/tty/vt/vt.c                 | 187 ++++++++---------
drivers/tty/vt/vt_ioctl.c           | 190 ++++++++----------
include/linux/console.h             |   2 +
include/linux/serial_core.h         |  13 ++
include/linux/tty_port.h            |  14 ++
17 files changed, 747 insertions(+), 1003 deletions(-)
[PATCH 00/16] tty: use lock, rpm, and free guards
Posted by Jiri Slaby (SUSE) 1 month, 3 weeks ago
The first 4 patches introduce guards for:
* console_lock/console_unlock
* tty_port_tty_get/tty_kref_put
* uart_port_lock/uart_port_unlock in all its variants (_irq, _irqsave,
  _try)
* serial8250_rpm_get/serial8250_rpm_put

"tty/vt: use guard()s" also introduces a local free_page_ptr guard for
__get_free_page/free_page (with proper casts). This could be made
public in include/.

The rest of patches make uses all those guards across the tty code.

Jiri Slaby (SUSE) (16):
  console: introduce console_lock guard()s
  tty: introduce tty_port_tty guard()
  serial: introduce uart_port_lock() guard()s
  serial: 8250: introduce RPM guard()s
  tty: tty_port: use guard()s
  mxser: use tty_port_tty guard() in mxser_port_isr()
  mxser: use guard()s
  serial: serial_core: use guard()s
  serial: 8250: use guard()s
  serial: 8250_core: use guard() in serial_unlink_irq_chain()
  serial: 8250_omap: extract omap_8250_set_termios_atomic()
  serial: 8250_omap: use guard()s
  serial: 8250_rsa: use guard()s
  tty/vt: use guard()s in con_font_set/get() and con_{set,get}_unimap()
  tty/vt: use guard()s
  s390/char/con3270: use tty_port_tty guard()

 drivers/s390/char/con3270.c         |  18 +-
 drivers/tty/mxser.c                 | 259 ++++++++++--------------
 drivers/tty/serial/8250/8250.h      |   5 +
 drivers/tty/serial/8250/8250_core.c |  91 ++++-----
 drivers/tty/serial/8250/8250_omap.c | 145 ++++++--------
 drivers/tty/serial/8250/8250_port.c | 298 ++++++++++++----------------
 drivers/tty/serial/8250/8250_rsa.c  |   7 +-
 drivers/tty/serial/serial_core.c    | 143 ++++++-------
 drivers/tty/tty_port.c              | 168 +++++++---------
 drivers/tty/vt/consolemap.c         | 116 +++++------
 drivers/tty/vt/selection.c          |  20 +-
 drivers/tty/vt/vc_screen.c          |  74 +++----
 drivers/tty/vt/vt.c                 | 187 ++++++++---------
 drivers/tty/vt/vt_ioctl.c           | 190 ++++++++----------
 include/linux/console.h             |   2 +
 include/linux/serial_core.h         |  13 ++
 include/linux/tty_port.h            |  14 ++
 17 files changed, 747 insertions(+), 1003 deletions(-)

-- 
2.50.1