1. 19 3月, 2010 4 次提交
    • A
      hvc_console: Fix race between hvc_close and hvc_remove · e74d098c
      Amit Shah 提交于
      Alan pointed out a race in the code where hvc_remove is invoked. The
      recent virtio_console work is the first user of hvc_remove().
      
      Alan describes it thus:
      
      The hvc_console assumes that a close and remove call can't occur at the
      same time.
      
      In addition tty_hangup(tty) is problematic as tty_hangup is asynchronous
      itself....
      
      So this can happen
      
              hvc_close                               hvc_remove
              hung up ? - no
                                                      lock
                                                      tty = hp->tty
                                                      unlock
              lock
              hp->tty = NULL
              unlock
              notify del
              kref_put the hvc struct
              close completes
              tty is destroyed
                                                      tty_hangup dead tty
                                                      tty->ops will be NULL
                                                      NULL->...
      
      This patch adds some tty krefs and also converts to using tty_vhangup().
      Reported-by: NAlan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: NAmit Shah <amit.shah@redhat.com>
      CC: Alan Cox <alan@lxorguk.ukuu.org.uk>
      CC: linuxppc-dev@ozlabs.org
      CC: Rusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      e74d098c
    • D
      uartlite: Fix build on sparc. · f157b585
      David Miller 提交于
      We can get this driver enabled via MFD_TIMBERDALE which only
      requires GPIO to be on.
      
      But the of_address_to_resource() function is only present on
      powerpc and microblaze, so we have to conditionalize the
      CONFIG_OF probing bits on that.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      Acked-by: NGrant Likely <grant.likely@secretlab.ca>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      f157b585
    • M
      tty: Take a 256 byte padding into account when buffering below sub-page units · 352fa6ad
      Mel Gorman 提交于
      The TTY layer takes some care to ensure that only sub-page allocations
      are made with interrupts disabled. It does this by setting a goal of
      "TTY_BUFFER_PAGE" to allocate. Unfortunately, while TTY_BUFFER_PAGE takes the
      size of tty_buffer into account, it fails to account that tty_buffer_find()
      rounds the buffer size out to the next 256 byte boundary before adding on
      the size of the tty_buffer.
      
      This patch adjusts the TTY_BUFFER_PAGE calculation to take into account the
      size of the tty_buffer and the padding. Once applied, tty_buffer_alloc()
      should not require high-order allocations.
      Signed-off-by: NMel Gorman <mel@csn.ul.ie>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      352fa6ad
    • G
      Revert "tty: Add a new VT mode which is like VT_PROCESS but doesn't require a... · 87a6aca5
      Greg Kroah-Hartman 提交于
      Revert "tty: Add a new VT mode which is like VT_PROCESS but doesn't require a VT_RELDISP ioctl call"
      
      This reverts commit eec9fe7d.
      
      Ari writes as the reason this should be reverted:
      	The problems with this patch include:
      	1. There's at least one subtlety I overlooked - switching
      	between X servers (i.e. from one X VT to another) still requires
      	the cooperation of both X servers. I was assuming that KMS
      	eliminated this.
      	2. It hasn't been tested at all (no X server patch exists which
      	uses the new mode).
      
      As he was the original author of the patch, I'll revert it.
      
      Cc: Ari Entlich <atrigent@ccs.neu.edu>
      Cc: Alan Cox <alan@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      87a6aca5
  2. 15 3月, 2010 31 次提交
  3. 14 3月, 2010 5 次提交