All of lore.kernel.org
 help / color / mirror / Atom feed
From: Amit Shah <amit.shah@redhat.com>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: Amit Shah <amit.shah@redhat.com>,
	Virtualization List <virtualization@lists.linux-foundation.org>
Subject: [PATCH 00/14] virtio: console: Hot-unplug fixes
Date: Thu,  2 Sep 2010 18:11:39 +0530	[thread overview]
Message-ID: <cover.1283430900.git.amit.shah@redhat.com> (raw)

Hey Rusty,

These are the patches that rework a few bits to make hot-unplug while
ports are open not crash apps (or kernels).

The problem is when hot-unplug is performed when a port is open, the
cdev struct is kept around by the file pointers and when the app later
does a 'close', things go boom-boom.

This patch series makes sure port as well as device hot-unplug is now
safe to perform at any time: when ports are open, not open, hvc
consoles are active, inactive, module removal, applications doing
blocking read/write/poll calls while port / devices are going away...

Ideally this patchset would be applicable for 2.6.36 as well as
2.6.35, but I'll let you decide as it's quite big.

Amit Shah (14):
  virtio: console: Reset vdev before removing device
  virtio: console: Remove control vq data only if using multiport
    support
  virtio: console: Check if portdev is valid in send_control_msg()
  virtio: console: Unblock reads on chardev close
  virtio: console: Unblock poll on port hot-unplug
  virtio: console: Make read() return -ENODEV on hot-unplug
  virtio: console: Make write() return -ENODEV on hot-unplug
  virtio: console: remove_port() should return void
  virtio: console: open: Use a common path for error handling
  virtio: console: Add a list of portdevs that are active
  virtio: console: Add a find_port_by_devt() function
  virtio: console: Use cdev_alloc() instead of cdev_init()
  virtio: console: Add reference counting for port struct
  virtio: console: Reference counting portdev structs is not needed

 drivers/char/virtio_console.c |  206 ++++++++++++++++++++++++++++++++++-------
 1 files changed, 173 insertions(+), 33 deletions(-)

-- 
1.7.2.2

             reply	other threads:[~2010-09-02 12:41 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-02 12:41 Amit Shah [this message]
2010-09-02 12:41 ` [PATCH 01/14] virtio: console: Reset vdev before removing device Amit Shah
2010-09-02 12:41 ` [PATCH 02/14] virtio: console: Remove control vq data only if using multiport support Amit Shah
2010-09-06  8:29   ` Rusty Russell
2010-09-06 10:22     ` Amit Shah
2010-09-02 12:41 ` [PATCH 03/14] virtio: console: Check if portdev is valid in send_control_msg() Amit Shah
2010-09-02 12:41 ` [PATCH 04/14] virtio: console: Un-block reads on chardev close Amit Shah
2010-09-02 12:41 ` [PATCH 05/14] virtio: console: Unblock poll on port hot-unplug Amit Shah
2010-09-02 12:41 ` [PATCH 06/14] virtio: console: Make read() return -ENODEV on hot-unplug Amit Shah
2010-09-02 12:41 ` [PATCH 07/14] virtio: console: Make write() " Amit Shah
2010-09-02 12:41 ` [PATCH 08/14] virtio: console: remove_port() should return void Amit Shah
2010-09-02 12:41 ` [PATCH 09/14] virtio: console: open: Use a common path for error handling Amit Shah
2010-09-02 12:41 ` [PATCH 10/14] virtio: console: Add a list of portdevs that are active Amit Shah
2010-09-02 12:50 ` [PATCH 11/14] virtio: console: Add a find_port_by_devt() function Amit Shah
2010-09-02 12:50 ` [PATCH 12/14] virtio: console: Use cdev_alloc() instead of cdev_init() Amit Shah
2010-09-02 13:08 ` [PATCH 13/14] virtio: console: Add reference counting for port struct Amit Shah
2010-09-02 13:08 ` [PATCH 14/14] virtio: console: Reference counting portdev structs is not needed Amit Shah

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=cover.1283430900.git.amit.shah@redhat.com \
    --to=amit.shah@redhat.com \
    --cc=rusty@rustcorp.com.au \
    --cc=virtualization@lists.linux-foundation.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.