1. 17 10月, 2013 1 次提交
  2. 04 6月, 2013 1 次提交
  3. 05 5月, 2013 1 次提交
  4. 02 3月, 2013 1 次提交
    • T
      sunsu: Fix panic in case of nonexistent port at "console=ttySY" cmdline option · cb29529e
      Tkhai Kirill 提交于
      If a machine has X (X < 4) sunsu ports and cmdline
      option "console=ttySY" is passed, where X < Y <= 4,
      than the following panic happens:
      
      Unable to handle kernel NULL pointer dereference
      TPC: <sunsu_console_setup+0x78/0xe0>
      RPC: <sunsu_console_setup+0x74/0xe0>
      I7: <register_console+0x378/0x3e0>
      Call Trace:
       [0000000000453a38] register_console+0x378/0x3e0
       [0000000000576fa0] uart_add_one_port+0x2e0/0x340
       [000000000057af40] su_probe+0x160/0x2e0
       [00000000005b8a4c] platform_drv_probe+0xc/0x20
       [00000000005b6c2c] driver_probe_device+0x12c/0x220
       [00000000005b6da8] __driver_attach+0x88/0xa0
       [00000000005b4df4] bus_for_each_dev+0x54/0xa0
       [00000000005b5a54] bus_add_driver+0x154/0x260
       [00000000005b7190] driver_register+0x50/0x180
       [00000000006d250c] sunsu_init+0x18c/0x1e0
       [00000000006c2668] do_one_initcall+0xe8/0x160
       [00000000006c282c] kernel_init_freeable+0x12c/0x1e0
       [0000000000603764] kernel_init+0x4/0x100
       [0000000000405f64] ret_from_syscall+0x1c/0x2c
       [0000000000000000]           (null)
      
      1)Fix the panic;
      2)Increment registered port number every successful
      probe.
      Signed-off-by: NKirill Tkhai <tkhai@yandex.ru>
      CC: David Miller <davem@davemloft.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cb29529e
  5. 16 1月, 2013 2 次提交
    • J
      TTY: switch tty_flip_buffer_push · 2e124b4a
      Jiri Slaby 提交于
      Now, we start converting tty buffer functions to actually use
      tty_port. This will allow us to get rid of the need of tty in many
      call sites. Only tty_port will needed and hence no more
      tty_port_tty_get in those paths.
      
      Now, the one where most of tty_port_tty_get gets removed:
      tty_flip_buffer_push.
      
      IOW we also closed all the races in drivers not using tty_port_tty_get
      at all yet.
      
      Also we move tty_flip_buffer_push declaration from include/linux/tty.h
      to include/linux/tty_flip.h to all others while we are changing it
      anyway.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      2e124b4a
    • J
      TTY: switch tty_insert_flip_char · 92a19f9c
      Jiri Slaby 提交于
      Now, we start converting tty buffer functions to actually use
      tty_port. This will allow us to get rid of the need of tty in many
      call sites. Only tty_port will needed and hence no more
      tty_port_tty_get in those paths.
      
      tty_insert_flip_char is the next one to proceed. This one is used all
      over the code, so the patch is huge.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      92a19f9c
  6. 22 11月, 2012 3 次提交
  7. 06 9月, 2012 2 次提交
  8. 29 3月, 2012 1 次提交
  9. 11 2月, 2012 1 次提交
  10. 10 6月, 2011 1 次提交
  11. 01 3月, 2011 1 次提交
  12. 14 1月, 2011 1 次提交
    • G
      tty: move drivers/serial/ to drivers/tty/serial/ · ab4382d2
      Greg Kroah-Hartman 提交于
      The serial drivers are really just tty drivers, so move them to
      drivers/tty/ to make things a bit neater overall.
      
      This is part of the tty/serial driver movement proceedure as proposed by
      Arnd Bergmann and approved by everyone involved a number of months ago.
      
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Rogier Wolff <R.E.Wolff@bitwizard.nl>
      Cc: Michael H. Warfield <mhw@wittsend.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      ab4382d2
  13. 06 8月, 2010 1 次提交
  14. 24 7月, 2010 1 次提交
  15. 29 6月, 2010 1 次提交
    • G
      sparc/of: Move of_device fields into struct pdev_archdata · 1636f8ac
      Grant Likely 提交于
      This patch moves SPARC architecture specific data members out of
      struct of_device and into the pdev_archdata structure.  The reason
      for this change is to unify the struct of_device definition amongst
      all the architectures.  It also remvoes the .sysdata, .slot, .portid
      and .clock_freq properties because they aren't actually used by
      anything.
      
      A subsequent patch will replace struct of_device entirely with struct
      platform_device and the of_platform support code will share common
      routines with the platform bus (but the bus instances themselves can
      remain separate).
      
      This patch also adds 'struct resources *resource' and num_resources
      to match the fields defined in struct platform_device.  After this
      change, 'struct platform_device' can be used as a drop-in replacement
      for 'struct of_platform'.
      
      This change is in preparation for merging the of_platform_bus_type
      with the platform_bus_type.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      1636f8ac
  16. 27 5月, 2010 1 次提交
    • D
      sunsu: Fix use after free in su_remove(). · 9616ff43
      David S. Miller 提交于
      Real serial port 'up' objects are statically allocated from an
      array in the driver.  Keyboard and mouse ports, on the other
      hand, are dynamically allocated.
      
      Unfortunately, we free these dynamic 'up' objects before we unmap the
      I/O registers.
      
      Rearrange su_remove() so that this does not happen.
      
      Noticed by Julia Lawall.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9616ff43
  17. 22 5月, 2010 1 次提交
    • G
      of: Remove duplicate fields from of_platform_driver · 4018294b
      Grant Likely 提交于
      .name, .match_table and .owner are duplicated in both of_platform_driver
      and device_driver.  This patch is a removes the extra copies from struct
      of_platform_driver and converts all users to the device_driver members.
      
      This patch is a pretty mechanical change.  The usage model doesn't change
      and if any drivers have been missed, or if anything has been fixed up
      incorrectly, then it will fail with a compile time error, and the fixup
      will be trivial.  This patch looks big and scary because it touches so
      many files, but it should be pretty safe.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Acked-by: NSean MacLennan <smaclennan@pikatech.com>
      4018294b
  18. 19 5月, 2010 1 次提交
  19. 30 3月, 2010 2 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
    • J
      drivers/serial/sunsu.c: Correct use after free · c4a3987f
      Julia Lawall 提交于
      The of_iounmap is at the out_unmap label, but at that point up has already
      been freed.  The free cannot be moved to the out_unmap label, because that
      label is reachable from cases where up should not be freed.  So the call to
      of_iounmap is just duplicated, and the goto converted to a return.
      
      A simplified version of the semantic match that finds this problem is as
      follows: (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @@
      expression x,e;
      identifier f;
      iterator I;
      statement S;
      @@
      
      *kfree(x);
      ... when != &x
          when != x = e
          when != I(x,...) S
      *x->f
      // </smpl>
      Signed-off-by: NJulia Lawall <julia@diku.dk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c4a3987f
  20. 25 11月, 2009 4 次提交
  21. 20 9月, 2009 2 次提交
  22. 08 4月, 2009 1 次提交
  23. 31 8月, 2008 1 次提交
  24. 12 8月, 2008 1 次提交
  25. 21 7月, 2008 2 次提交
  26. 02 5月, 2008 1 次提交
    • D
      serial: Fix sparc driver name strings. · 32039f49
      David S. Miller 提交于
      They were all "serial" so if multiple of these drivers registered,
      we'd trigger sysfs directory creation errors:
      
      [    1.695793] proc_dir_entry 'serial' already registered
      [    1.695839] Call Trace:
      [    1.831891]  [00000000004f2534] create_proc_entry+0x7c/0x98
      [    1.833608]  [00000000004f3a58] proc_tty_register_driver+0x40/0x70
      [    1.833663]  [0000000000594700] tty_register_driver+0x1fc/0x208
      [    1.835371]  [00000000005aade4] uart_register_driver+0x134/0x16c
      [    1.841762]  [00000000005ac274] sunserial_register_minors+0x34/0x68
      [    1.841818]  [00000000007db2a4] sunsu_init+0xf8/0x150
      [    1.867697]  [00000000007c62a4] kernel_init+0x190/0x330
      [    1.939147]  [0000000000426cf8] kernel_thread+0x38/0x48
      [    1.939198]  [00000000006a0d90] rest_init+0x18/0x5c
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      32039f49
  27. 12 12月, 2007 1 次提交
    • M
      [SERIAL] sparc: Infrastructure to fix section mismatch bugs. · 58d784a5
      Martin Habets 提交于
      This patch against 2.6.23 sparc-2.6.git contains a number of minor
      cleanups of the sparc serial drivers.  Initially I fixed this build
      warning:
      
      WARNING: vmlinux.o(.text+0x107a2c): Section mismatch: reference to .init.text:add_preferred_console (between 'sunserial_console_match' and 'sunserial_console_termios')
      
      which is done by declaring sunserial_console_match() as __init.  This
      resulted in build warnings on sunserial_current_minor.  To resolve
      these the variable was changed so it is no longer global, and to hide
      operations on it inside 2 new functions. These functions handle the
      UART minor handling code that is common to all sparc serial drivers.
      
      These changes allowed to clean up the uart counters in all the sparc
      serial drivers, and the administration of minor device numbers.
      
      Lastly, sunserial_console_termios() does not need to be exported since
      it is only called from non-modular code.
      
      Sadly, the following build warning still exists:
      
      WARNING: vmlinux.o(__ksymtab+0x2910): Section mismatch: reference to .init.text:sunserial_console_match (between '__ksymtab_sunserial_console_match' and '__ksymtab_sunserial_unregister_minors')
      
      This could be resolved by not exporting sunserial_console_match(), but
      this is not possible at the moment because it is being called from
      modular code. On the other hand, this is a bogus warning since it
      comes from a ksymtab section.
      Signed-off-by: NMartin Habets <errandir_news@mph.eclipse.co.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      58d784a5
  28. 27 8月, 2007 1 次提交
  29. 21 7月, 2007 1 次提交
    • D
      [SPARC]: Fix serial console device detection. · c73fcc84
      David S. Miller 提交于
      The current scheme works on static interpretation of text names, which
      is wrong.
      
      The output-device setting, for example, must be resolved via an alias
      or similar to a full path name to the console device.
      
      Paths also contain an optional set of 'options', which starts with a
      colon at the end of the path.  The option area is used to specify
      which of two serial ports ('a' or 'b') the path refers to when a
      device node drives multiple ports.  'a' is assumed if the option
      specification is missing.
      
      This was caught by the UltraSPARC-T1 simulator.  The 'output-device'
      property was set to 'ttya' and we didn't pick upon the fact that this
      is an OBP alias set to '/virtual-devices/console'.  Instead we saw it
      as the first serial console device, instead of the hypervisor console.
      
      The infrastructure is now there to take advantage of this to resolve
      the console correctly even in multi-head situations in fbcon too.
      
      Thanks to Greg Onufer for the bug report.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c73fcc84
  30. 16 7月, 2007 1 次提交