1. 19 1月, 2013 1 次提交
    • J
      tty: Added a CONFIG_TTY option to allow removal of TTY · 4f73bc4d
      Joe Millenbach 提交于
      The option allows you to remove TTY and compile without errors. This
      saves space on systems that won't support TTY interfaces anyway.
      bloat-o-meter output is below.
      
      The bulk of this patch consists of Kconfig changes adding "depends on
      TTY" to various serial devices and similar drivers that require the TTY
      layer.  Ideally, these dependencies would occur on a common intermediate
      symbol such as SERIO, but most drivers "select SERIO" rather than
      "depends on SERIO", and "select" does not respect dependencies.
      
      bloat-o-meter output comparing our previous minimal to new minimal by
      removing TTY.  The list is filtered to not show removed entries with awk
      '$3 != "-"' as the list was very long.
      
      add/remove: 0/226 grow/shrink: 2/14 up/down: 6/-35356 (-35350)
      function                                     old     new   delta
      chr_dev_init                                 166     170      +4
      allow_signal                                  80      82      +2
      static.__warned                              143     142      -1
      disallow_signal                               63      62      -1
      __set_special_pids                            95      94      -1
      unregister_console                           126     121      -5
      start_kernel                                 546     541      -5
      register_console                             593     588      -5
      copy_from_user                                45      40      -5
      sys_setsid                                   128     120      -8
      sys_vhangup                                   32      19     -13
      do_exit                                     1543    1526     -17
      bitmap_zero                                   60      40     -20
      arch_local_irq_save                          137     117     -20
      release_task                                 674     652     -22
      static.spin_unlock_irqrestore                308     260     -48
      Signed-off-by: NJoe Millenbach <jmillenbach@gmail.com>
      Reviewed-by: NJamey Sharp <jamey@minilop.net>
      Reviewed-by: NJosh Triplett <josh@joshtriplett.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4f73bc4d
  2. 27 11月, 2012 1 次提交
  3. 25 10月, 2012 1 次提交
  4. 17 8月, 2012 7 次提交
  5. 31 7月, 2012 1 次提交
  6. 25 1月, 2012 1 次提交
  7. 05 1月, 2012 3 次提交
  8. 01 11月, 2011 1 次提交
  9. 23 8月, 2011 8 次提交
  10. 08 6月, 2011 2 次提交
    • S
      drivers:misc: ti-st: fix skipping of change remote baud · 9d031d94
      Shahar Lev 提交于
      Before the incrementing of ptr in skip_change_remote_baud,
      it points to cur_action, but the increment is done by
      the size of nxt_action instead. This could cause ptr
      to not point to a bts_action structure, which is
      harmful for the increment of ptr done in download_firmware.
      Therefore, the skipping is first done for cur_action.
      Signed-off-by: NShahar Lev <shahar@wizery.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      9d031d94
    • S
      st_kim: Handle case of no device found for ID 0 · 7316a9f2
      Steven Rostedt 提交于
      Running ktest.pl, I hit this bug:
      
      [   19.780654] BUG: unable to handle kernel NULL pointer dereference at 0000000c
      [   19.780660] IP: [<c112efcd>] dev_get_drvdata+0xc/0x46
      [   19.780669] *pdpt = 0000000031daf001 *pde = 0000000000000000
      [   19.780673] Oops: 0000 [#1] SMP
      [   19.780680] Dumping ftrace buffer:^M
      [   19.780685]    (ftrace buffer empty)
      [   19.780687] Modules linked in: ide_pci_generic firewire_ohci firewire_core evbug crc_itu_t e1000 ide_core i2c_i801 iTCO_wdt
      [   19.780697]
      [   19.780700] Pid: 346, comm: v4l_id Not tainted 2.6.39-test-02740-gcaebc160-dirty #4                  /DG965MQ
      [   19.780706] EIP: 0060:[<c112efcd>] EFLAGS: 00010202 CPU: 0
      [   19.780709] EIP is at dev_get_drvdata+0xc/0x46
      [   19.780712] EAX: 00000008 EBX: f1e37da4 ECX: 00000000 EDX: 00000000
      [   19.780715] ESI: f1c3f200 EDI: c33ec95c EBP: f1e37d80 ESP: f1e37d80
      [   19.780718]  DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
      [   19.780721] Process v4l_id (pid: 346, ti=f1e36000 task=f2bc2a60 task.ti=f1e36000)
      [   19.780723] Stack:
      [   19.780725]  f1e37d8c c117d395 c33ec93c f1e37db4 c117a0f9 00000002 00000000 c1725e54
      [   19.780732]  00000001 00000007 f2918c90 f1c3f200 c33ec95c f1e37dd4 c1789d3d 22222222
      [   19.780740]  22222222 22222222 f2918c90 f1c3f200 f29194f4 f1e37de8 c178d5c4 c1725e54
      [   19.780747] Call Trace:
      [   19.780752]  [<c117d395>] st_kim_ref+0x28/0x41
      [   19.780756]  [<c117a0f9>] st_register+0x29/0x562
      [   19.780761]  [<c1725e54>] ? v4l2_open+0x111/0x1e3
      [   19.780766]  [<c1789d3d>] fmc_prepare+0x97/0x424
      [   19.780770]  [<c178d5c4>] fm_v4l2_fops_open+0x70/0x106
      [   19.780773]  [<c1725e54>] ? v4l2_open+0x111/0x1e3
      [   19.780777]  [<c1725e9b>] v4l2_open+0x158/0x1e3
      [   19.780782]  [<c065173b>] chrdev_open+0x22c/0x276
      [   19.780787]  [<c0647c4e>] __dentry_open+0x35c/0x581
      [   19.780792]  [<c06498f9>] nameidata_to_filp+0x7c/0x96
      [   19.780795]  [<c065150f>] ? cdev_put+0x57/0x57
      [   19.780800]  [<c0660cad>] do_last+0x743/0x9d4
      [   19.780804]  [<c065d5fc>] ? path_init+0x1ee/0x596
      [   19.780808]  [<c0661481>] path_openat+0x10c/0x597
      [   19.780813]  [<c05204a1>] ? trace_hardirqs_off+0x27/0x37
      [   19.780817]  [<c0509651>] ? local_clock+0x78/0xc7
      [   19.780821]  [<c0661945>] do_filp_open+0x39/0xc2
      [   19.780827]  [<c1cabc76>] ? _raw_spin_unlock+0x4c/0x5d^M
      [   19.780831]  [<c0674ccd>] ? alloc_fd+0x19e/0x1b7
      [   19.780836]  [<c06499ca>] do_sys_open+0xb7/0x1bd
      [   19.780840]  [<c0608eea>] ? sys_munmap+0x78/0x8d
      [   19.780844]  [<c0649b06>] sys_open+0x36/0x58
      [   19.780849]  [<c1cb809f>] sysenter_do_call+0x12/0x38
      [   19.780852] Code: d8 2f 20 c3 01 83 15 dc 2f 20 c3 00 f0 ff 00 83 05 e0 2f 20 c3 01 83 15 e4 2f 20 c3 00 5d c3 55 89 e5 3e 8d 74 26 00 85 c0 74 28 <8b> 40 04 83 05 e8 2f 20 c3 01 83 15 ec 2f 20 c3 00 85 c0 74 13 ^M
      [   19.780889] EIP: [<c112efcd>] dev_get_drvdata+0xc/0x46 SS:ESP 0068:f1e37d80
      [   19.780894] CR2: 000000000000000c
      [   19.780898] ---[ end trace e7d1d0f6a2d1d390 ]---
      
      The id of 0 passed to st_kim_ref() found no device, keeping pdev null,
      and causing pdev->dev cause a NULL pointer dereference. After having
      st_kim_ref() check for NULL, the st_unregister() function needed to be
      updated to handle the case that st_gdata was not set by the
      st_kim_ref().
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      7316a9f2
  11. 04 6月, 2011 1 次提交
    • L
      Revert "tty: make receive_buf() return the amout of bytes received" · 55db4c64
      Linus Torvalds 提交于
      This reverts commit b1c43f82.
      
      It was broken in so many ways, and results in random odd pty issues.
      
      It re-introduced the buggy schedule_work() in flush_to_ldisc() that can
      cause endless work-loops (see commit a5660b41: "tty: fix endless
      work loop when the buffer fills up").
      
      It also used an "unsigned int" return value fo the ->receive_buf()
      function, but then made multiple functions return a negative error code,
      and didn't actually check for the error in the caller.
      
      And it didn't actually work at all.  BenH bisected down odd tty behavior
      to it:
        "It looks like the patch is causing some major malfunctions of the X
         server for me, possibly related to PTYs.  For example, cat'ing a
         large file in a gnome terminal hangs the kernel for -minutes- in a
         loop of what looks like flush_to_ldisc/workqueue code, (some ftrace
         data in the quoted bits further down).
      
         ...
      
         Some more data: It -looks- like what happens is that the
         flush_to_ldisc work queue entry constantly re-queues itself (because
         the PTY is full ?) and the workqueue thread will basically loop
         forver calling it without ever scheduling, thus starving the consumer
         process that could have emptied the PTY."
      
      which is pretty much exactly the problem we fixed in a5660b41.
      
      Milton Miller pointed out the 'unsigned int' issue.
      Reported-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Reported-by: NMilton Miller <miltonm@bga.com>
      Cc: Stefan Bigler <stefan.bigler@keymile.com>
      Cc: Toby Gray <toby.gray@realvnc.com>
      Cc: Felipe Balbi <balbi@ti.com>
      Cc: Greg Kroah-Hartman <gregkh@suse.de>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      55db4c64
  12. 30 4月, 2011 1 次提交
    • R
      misc: fix ti-st build issues · 773d6790
      Randy Dunlap 提交于
      st_drv uses skb*() interfaces, so it should depend on NET.
      It also uses GPIO interfaces, so it should depend on GPIOLIB.
      
      st_kim.c uses syss_*() calls, so it should #include
      <linux/sysfs.h>.
      
      Fixes these observed build errors:
      ERROR: "skb_queue_purge" [drivers/misc/ti-st/st_drv.ko] undefined!
      ERROR: "skb_pull" [drivers/misc/ti-st/st_drv.ko] undefined!
      ERROR: "skb_queue_tail" [drivers/misc/ti-st/st_drv.ko] undefined!
      ERROR: "__alloc_skb" [drivers/misc/ti-st/st_drv.ko] undefined!
      ERROR: "kfree_skb" [drivers/misc/ti-st/st_drv.ko] undefined!
      ERROR: "skb_dequeue" [drivers/misc/ti-st/st_drv.ko] undefined!
      ERROR: "skb_put" [drivers/misc/ti-st/st_drv.ko] undefined!
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Cc: Pavan Savoy <pavan_savoy@ti.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      773d6790
  13. 23 4月, 2011 3 次提交
  14. 31 3月, 2011 1 次提交
  15. 10 3月, 2011 1 次提交
  16. 05 2月, 2011 7 次提交