1. 02 11月, 2011 7 次提交
  2. 30 5月, 2011 1 次提交
  3. 21 4月, 2011 1 次提交
    • A
      virtio: console: Enable call to hvc_remove() on console port remove · afa2689e
      Amit Shah 提交于
      This call was disabled as hot-unplugging one virtconsole port led to
      another virtconsole port freezing.
      
      Upon testing it again, this now works, so enable it.
      
      In addition, a bug was found in qemu wherein removing a port of one type
      caused the guest output from another port to stop working.  I doubt it
      was just this bug that caused it (since disabling the hvc_remove() call
      did allow other ports to continue working), but since it's all solved
      now, we're fine with hot-unplugging of virtconsole ports.
      Signed-off-by: NAmit Shah <amit.shah@redhat.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      afa2689e
  4. 07 3月, 2011 1 次提交
  5. 04 2月, 2011 1 次提交
  6. 14 1月, 2011 1 次提交
  7. 24 11月, 2010 1 次提交
    • J
      Char: virtio_console, fix memory leak · 22e132ff
      Jiri Slaby 提交于
      Stanse found that in init_vqs, memory is leaked under certain
      circumstanses (the fail path order is incorrect). Fix that by checking
      allocations in one turn and free all of them at once if some fails
      (some may be NULL, but this is OK).
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Cc: Amit Shah <amit.shah@redhat.com>
      Cc: virtualization@lists.linux-foundation.org
      Cc: Greg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      22e132ff
  8. 21 10月, 2010 19 次提交
  9. 21 9月, 2010 2 次提交
  10. 03 6月, 2010 2 次提交
  11. 19 5月, 2010 4 次提交
    • J
      drivers/char: Eliminate use after free · 0643e4c6
      Julia Lawall 提交于
      In each case, the first argument to send_control_msg or __send_control_msg,
      respectively, has either not been successfully allocated or has been freed
      at the point of the call.  In the first case, the first argument, port, is
      only used to access the portdev and id fields, in order to call
      __send_control_msg.  Thus it seems possible instead to call
      __send_control_msg directly.  In the second case, the call to
      __send_control_msg is moved up to a place where it seems like the first
      argument, portdev, has been initialized sufficiently to make the call to
      __send_control_msg meaningful.
      
      This has only been compile tested.
      
      A simplified version of the semantic match that finds this problem is as
      follows: (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @free@
      expression E;
      position p;
      @@
      kfree@p(E)
      
      @@
      expression free.E, subE<=free.E, E1;
      position free.p;
      @@
      
        kfree@p(E)
        ...
      (
        subE = E1
      |
      * E
      )
      // </smpl>
      Signed-off-by: NJulia Lawall <julia@diku.dk>
      Acked-by: NAmit Shah <amit.shah@redhat.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      0643e4c6
    • A
      virtio: console: Accept console size along with resize control message · 8345adbf
      Amit Shah 提交于
      The VIRTIO_CONSOLE_RESIZE control message sent to us by the host now
      contains the new {rows, cols} values for the console. This ensures each
      console port gets its own size, and we don't depend on the config-space
      rows and cols values at all now.
      Signed-off-by: NAmit Shah <amit.shah@redhat.com>
      CC: Christian Borntraeger <borntraeger@de.ibm.com>
      CC: linuxppc-dev@ozlabs.org
      CC: Kusanagi Kouichi <slash@ac.auone-net.jp>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      8345adbf
    • A
      virtio: console: Store each console's size in the console structure · 9778829c
      Amit Shah 提交于
      With support for multiple consoles, just using one {rows,cols} pair in
      the config space is not going to suffice.
      
      Store each console's size as part of the console struct.
      
      This changes the behaviour for one case when multiport is not enabled:
      when notifier_add_vio() is called, the console size is taken from that
      of the last config-space update instead of fetching it afresh from the
      config space.
      
      Also add a helper to update the size in the console struct as we'll need
      to use the same code to update the size via control messages when
      multiport support is enabled.
      Signed-off-by: NAmit Shah <amit.shah@redhat.com>
      CC: Christian Borntraeger <borntraeger@de.ibm.com>
      CC: linuxppc-dev@ozlabs.org
      CC: Kusanagi Kouichi <slash@ac.auone-net.jp>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      9778829c
    • A
      virtio: console: Resize console port 0 on config intr only if multiport is off · 4038f5b7
      Amit Shah 提交于
      When using multiport, we'll use control messages. Ensure we don't
      accidentally update port 0 size on config interrupts.
      Signed-off-by: NAmit Shah <amit.shah@redhat.com>
      CC: Christian Borntraeger <borntraeger@de.ibm.com>
      CC: linuxppc-dev@ozlabs.org
      CC: Kusanagi Kouichi <slash@ac.auone-net.jp>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      4038f5b7