1. 16 11月, 2012 3 次提交
  2. 15 11月, 2012 5 次提交
    • H
      s390/3215: fix tty close handling · ae289dc1
      Heiko Carstens 提交于
      The 3215 console always has the RAW3215_FIXED flag set, which causes
      raw3215_shutdown() not to wait for outstanding I/O requests if an attached
      tty gets closed.
      The flag however can be simply removed, so we can guarantee that all requests
      belonging to the tty have been processed when the tty is closed.
      
      However the tasklet that belongs to the 3215 device may be scheduled even if
      there is no tty attached anymore, since we have a race between console and tty
      processing.
      Thefore unconditional tty_wakekup() in raw3215_wakeup() can cause the following
      NULL pointer dereference:
      
      3.465368 Unable to handle kernel pointer dereference at virtual kernel address (null)
      3.465448 Oops: 0004 #1 SMP
      3.465454 Modules linked in:
      3.465459 CPU: 1 Not tainted 3.6.0 #1
      3.465462 Process swapper/1 (pid: 0, task: 000000003ffa4428, ksp: 000000003ffb7ce0)
      3.465466 Krnl PSW : 0404100180000000 0000000000162f86 (__wake_up+0x46/0xb8)
      3.465480            R:0 T:1 IO:0 EX:0 Key:0 M:1 W:0 P:0 AS:0 CC:1 PM:0 EA:3
               Krnl GPRS: fffffffffffffffe 0000000000000000 0000000000000160 0000000000000001
      3.465492            0000000000000001 0000000000000004 0000000000000004 000000000096b490
      3.465499            0000000000000001 0000000000000100 0000000000000001 0000000000000001
      3.465506            070000003fc87d60 0000000000000160 000000003fc87d68 000000003fc87d00
      3.465526 Krnl Code: 0000000000162f76: e3c0f0a80004      lg      %r12,168(%r15)
                          0000000000162f7c: 58000370          l       %r0,880
                         #0000000000162f80: c007ffffffff00    xilf    %r0,4294967295
                         >0000000000162f86: ba102000          cs      %r1,%r0,0(%r2)
                          0000000000162f8a: 1211              ltr     %r1,%r1
                          0000000000162f8c: a774002f          brc     7,162fea
                          0000000000162f90: b904002d          lgr     %r2,%r13
                          0000000000162f94: b904003a          lgr     %r3,%r10
      3.465597 Call Trace:
      3.465599 (<0400000000000000> 0x400000000000000)
      3.465602  <000000000048c77e> raw3215_wakeup+0x2e/0x40
      3.465607  <0000000000134d66> tasklet_action+0x96/0x168
      3.465612  <000000000013423c> __do_softirq+0xd8/0x21c
      3.465615  <0000000000134678> irq_exit+0xa8/0xac
      3.465617  <000000000046c232> do_IRQ+0x182/0x248
      3.465621  <00000000005c8296> io_return+0x0/0x8
      3.465625  <00000000005c7cac> vtime_stop_cpu+0x4c/0xb8
      3.465629 (<0000000000194e06> tick_nohz_idle_enter+0x4e/0x74)
      3.465633  <0000000000104760> cpu_idle+0x170/0x184
      3.465636  <00000000005b5182> smp_start_secondary+0xd6/0xe0
      3.465641  <00000000005c86be> restart_int_handler+0x56/0x6c
      3.465643  <0000000000000000> 0x0
      3.465645 Last Breaking-Event-Address:
      3.465647  <0000000000403136> tty_wakeup+0x46/0x98
      3.465652
      3.465654 Kernel panic - not syncing: Fatal exception in interrupt
      01: HCPGIR450W CP entered; disabled wait PSW 00020001 80000000 00000000 0010F63C
      
      The easiest solution is simply to check if tty is NULL in the tasklet.
      If it is NULL nothing is to do (no tty attached), otherwise tty_wakeup()
      can be called, since we hold a reference to the tty.
      This is not nice... but it is a small patch and it works.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      ae289dc1
    • A
    • M
      regulator: fix voltage check in regulator_is_supported_voltage() · f0f98b19
      Marek Szyprowski 提交于
      regulator_is_supported_voltage() should return true only if the voltage
      of fixed/constant regulator is between min_uV and max_uV.
      Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      Cc: stable@vger.kernel.org
      f0f98b19
    • A
      tty: serial: max310x: Add terminating entry for spi_device_id table · 1838b8c4
      Axel Lin 提交于
      The spi_device_id table is supposed to be zero-terminated.
      Signed-off-by: NAxel Lin <axel.lin@ingics.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      1838b8c4
    • P
      TTY: hvc_console, fix port reference count going to zero prematurely · c019bc11
      Paul Mackerras 提交于
      Commit bdb498c2 "TTY: hvc_console, add tty install" took the port
      refcounting out of hvc_open()/hvc_close(), but failed to remove the
      kref_put() and tty_kref_put() calls in hvc_hangup() that were there to
      remove the extra references that hvc_open() had taken.
      
      The result was that doing a vhangup() when the current terminal was
      a hvc_console, then closing the current terminal, would end up calling
      destroy_hvc_struct() and making the port disappear entirely.  This
      meant that Fedora 17 systems would boot up but then not display the
      login prompt on the console, and attempts to open /dev/hvc0 would
      give a "No such device" error.
      
      This fixes it by removing the extra kref_put() and tty_kref_put() calls.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Acked-by: NJiri Slaby <jslaby@suse.cz>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c019bc11
  3. 14 11月, 2012 7 次提交
  4. 13 11月, 2012 7 次提交
  5. 12 11月, 2012 2 次提交
    • J
      HID: microsoft: do not use compound literal - fix build · 6b90466c
      Jiri Slaby 提交于
      In patch "HID: microsoft: fix invalid rdesc for 3k kbd" I fixed
      support for MS 3k keyboards. However the added check using memcmp and
      a compound statement breaks build on architectures where memcmp is a
      macro with parameters.
      
      hid-microsoft.c:51:18: error: macro "memcmp" passed 6 arguments, but takes just 3
      
      On x86_64, memcmp is a function, so I did not see the error.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Reported-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      6b90466c
    • N
      ledtrig-cpu: kill useless mutex to fix sleep in atomic context · 0b8728d6
      Nathan Lynch 提交于
      Seeing the following every time the CPU enters or leaves idle on a
      Beagleboard:
      
      BUG: sleeping function called from invalid context at kernel/mutex.c:269
      in_atomic(): 1, irqs_disabled(): 0, pid: 0, name: swapper/0
      no locks held by swapper/0/0.
      [<c001659c>] (unwind_backtrace+0x0/0xf8) from [<c05aaa7c>] (mutex_lock_nested+0x24/0x380)
      [<c05aaa7c>] (mutex_lock_nested+0x24/0x380) from [<c043bd1c>] (ledtrig_cpu+0x38/0x88)
      [<c043bd1c>] (ledtrig_cpu+0x38/0x88) from [<c000f4b0>] (cpu_idle+0xf4/0x120)
      [<c000f4b0>] (cpu_idle+0xf4/0x120) from [<c07e47c8>] (start_kernel+0x2bc/0x30c)
      
      Miles Lane has reported seeing similar splats during system suspend.
      
      The mutex in struct led_trigger_cpu appears to have no function: it
      resides in a per-cpu data structure which never changes after the
      trigger is registered.  So just remove it.
      Reported-by: NMiles Lane <miles.lane@gmail.com>
      Signed-off-by: NNathan Lynch <ntl@pobox.com>
      Signed-off-by: NBryan Wu <roc@roc-samos.(none)>
      0b8728d6
  6. 10 11月, 2012 3 次提交
  7. 09 11月, 2012 8 次提交
  8. 08 11月, 2012 5 次提交