1. 13 8月, 2013 7 次提交
    • B
      serial: sirf: add support for Marco chip · 909102db
      Barry Song 提交于
      the marco and coming new CSR multiple SoCs have SET/CLR pair for
      INTEN registers to avoid some read-modify-write.
      
      this patch adds support for this and make the driver support current
      up and coming mp SoCs.
      Signed-off-by: NBarry Song <Baohua.Song@csr.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      909102db
    • S
      serial: i.MX: evaluate linux,stdout-path property · f7d2c0bb
      Sascha Hauer 提交于
      devicetrees may have the linux,stdout-path property to specify the
      console. This patch adds support to the i.MX serial driver for this.
      Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f7d2c0bb
    • S
      OF: Add helper for matching against linux,stdout-path · 5c19e952
      Sascha Hauer 提交于
      devicetrees may have a linux,stdout-path property in the chosen
      node describing the console device. This adds a helper function
      to match a device against this property so a driver can call
      add_preferred_console for a matching device.
      Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de>
      Acked-by: NRob Herring <rob.herring@calxeda.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      5c19e952
    • G
      tty: ar933x_uart: convert to use devm_* functions · a324e4de
      Gabor Juhos 提交于
      Use devm_* functions in order to simplify cleanup
      paths.
      Signed-off-by: NGabor Juhos <juhosg@openwrt.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a324e4de
    • P
      n_tty: Fix termios_rwsem lockdep false positive · aefceaf4
      Peter Hurley 提交于
      Lockdep reports a circular lock dependency between
      atomic_read_lock and termios_rwsem [1]. However, a lock
      order deadlock is not possible since CPU1 only holds a
      read lock which cannot prevent CPU0 from also acquiring
      a read lock on the same r/w semaphore.
      
      Unfortunately, lockdep cannot currently distinguish whether
      the locks are read or write for any particular lock graph,
      merely that the locks _were_ previously read and/or write.
      
      Until lockdep is fixed, re-order atomic_read_lock so
      termios_rwsem can be dropped and reacquired without
      triggering lockdep.
      
      Patch based on original posted here https://lkml.org/lkml/2013/8/1/510
      by Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
      
      [1] Initial lockdep report from Artem Savkov <artem.savkov@gmail.com>
      
       ======================================================
       [ INFO: possible circular locking dependency detected ]
       3.11.0-rc3-next-20130730+ #140 Tainted: G        W
       -------------------------------------------------------
       bash/1198 is trying to acquire lock:
        (&tty->termios_rwsem){++++..}, at: [<ffffffff816aa3bb>] n_tty_read+0x49b/0x660
      
       but task is already holding lock:
        (&ldata->atomic_read_lock){+.+...}, at: [<ffffffff816aa0f0>] n_tty_read+0x1d0/0x660
      
       which lock already depends on the new lock.
      
       the existing dependency chain (in reverse order) is:
      
       -> #1 (&ldata->atomic_read_lock){+.+...}:
              [<ffffffff811111cc>] validate_chain+0x73c/0x850
              [<ffffffff811117e0>] __lock_acquire+0x500/0x5d0
              [<ffffffff81111a29>] lock_acquire+0x179/0x1d0
              [<ffffffff81d34b9c>] mutex_lock_interruptible_nested+0x7c/0x540
              [<ffffffff816aa0f0>] n_tty_read+0x1d0/0x660
              [<ffffffff816a3bb6>] tty_read+0x86/0xf0
              [<ffffffff811f21d3>] vfs_read+0xc3/0x130
              [<ffffffff811f2702>] SyS_read+0x62/0xa0
              [<ffffffff81d45259>] system_call_fastpath+0x16/0x1b
      
       -> #0 (&tty->termios_rwsem){++++..}:
              [<ffffffff8111064f>] check_prev_add+0x14f/0x590
              [<ffffffff811111cc>] validate_chain+0x73c/0x850
              [<ffffffff811117e0>] __lock_acquire+0x500/0x5d0
              [<ffffffff81111a29>] lock_acquire+0x179/0x1d0
              [<ffffffff81d372c1>] down_read+0x51/0xa0
              [<ffffffff816aa3bb>] n_tty_read+0x49b/0x660
              [<ffffffff816a3bb6>] tty_read+0x86/0xf0
              [<ffffffff811f21d3>] vfs_read+0xc3/0x130
              [<ffffffff811f2702>] SyS_read+0x62/0xa0
              [<ffffffff81d45259>] system_call_fastpath+0x16/0x1b
      
       other info that might help us debug this:
      
        Possible unsafe locking scenario:
      
              CPU0                    CPU1
              ----                    ----
         lock(&ldata->atomic_read_lock);
                                      lock(&tty->termios_rwsem);
                                      lock(&ldata->atomic_read_lock);
         lock(&tty->termios_rwsem);
      
        *** DEADLOCK ***
      
       2 locks held by bash/1198:
        #0:  (&tty->ldisc_sem){.+.+.+}, at: [<ffffffff816ade04>] tty_ldisc_ref_wait+0x24/0x60
        #1:  (&ldata->atomic_read_lock){+.+...}, at: [<ffffffff816aa0f0>] n_tty_read+0x1d0/0x660
      
       stack backtrace:
       CPU: 1 PID: 1198 Comm: bash Tainted: G        W    3.11.0-rc3-next-20130730+ #140
       Hardware name: Bochs Bochs, BIOS Bochs 01/01/2007
        0000000000000000 ffff880019acdb28 ffffffff81d34074 0000000000000002
        0000000000000000 ffff880019acdb78 ffffffff8110ed75 ffff880019acdb98
        ffff880019fd0000 ffff880019acdb78 ffff880019fd0638 ffff880019fd0670
       Call Trace:
        [<ffffffff81d34074>] dump_stack+0x59/0x7d
        [<ffffffff8110ed75>] print_circular_bug+0x105/0x120
        [<ffffffff8111064f>] check_prev_add+0x14f/0x590
        [<ffffffff81d3ab5f>] ? _raw_spin_unlock_irq+0x4f/0x70
        [<ffffffff811111cc>] validate_chain+0x73c/0x850
        [<ffffffff8110ae0f>] ? trace_hardirqs_off_caller+0x1f/0x190
        [<ffffffff811117e0>] __lock_acquire+0x500/0x5d0
        [<ffffffff81111a29>] lock_acquire+0x179/0x1d0
        [<ffffffff816aa3bb>] ? n_tty_read+0x49b/0x660
        [<ffffffff81d372c1>] down_read+0x51/0xa0
        [<ffffffff816aa3bb>] ? n_tty_read+0x49b/0x660
        [<ffffffff816aa3bb>] n_tty_read+0x49b/0x660
        [<ffffffff810e4130>] ? try_to_wake_up+0x210/0x210
        [<ffffffff816a3bb6>] tty_read+0x86/0xf0
        [<ffffffff811f21d3>] vfs_read+0xc3/0x130
        [<ffffffff811f2702>] SyS_read+0x62/0xa0
        [<ffffffff815e24ee>] ? trace_hardirqs_on_thunk+0x3a/0x3f
        [<ffffffff81d45259>] system_call_fastpath+0x16/0x1b
      Reported-by: NArtem Savkov <artem.savkov@gmail.com>
      Reported-by: NSergey Senozhatsky <sergey.senozhatsky@gmail.com>
      Signed-off-by: NPeter Hurley <peter@hurleysoftware.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      aefceaf4
    • J
      serial: pxa: Staticize local symbols · 6c62cc0d
      Jingoo Han 提交于
      These local symbols are used only in this file.
      Fix the following sparse warnings:
      
      drivers/tty/serial/pxa.c:793:17: warning: symbol 'serial_pxa_pops' was not declared. Should it be static?
      drivers/tty/serial/pxa.c:971:12: warning: symbol 'serial_pxa_init' was not declared. Should it be static?
      drivers/tty/serial/pxa.c:986:13: warning: symbol 'serial_pxa_exit' was not declared. Should it be static?
      Signed-off-by: NJingoo Han <jg1.han@samsung.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6c62cc0d
    • D
      tty: serial: pxa: remove old cruft · 331b3734
      Daniel Mack 提交于
      This #if-0'd block wouldn't compile, so let's dispose it.
      Signed-off-by: NDaniel Mack <zonque@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      331b3734
  2. 05 8月, 2013 11 次提交
  3. 04 8月, 2013 14 次提交
  4. 03 8月, 2013 8 次提交
    • V
      hwmon: (max6697) fix MAX6581 ideality · 5c52add1
      Vivien Didelot 提交于
      Without this patch, the values for ideality (register 0x4b) and ideality
      selection mask (register 0x4c) are inverted.
      Signed-off-by: NVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Cc: stable@vger.kernel.org # 3.9+
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      5c52add1
    • R
      Merge branch 'security-fixes' into fixes · e35ac62d
      Russell King 提交于
      e35ac62d
    • R
      ARM: fix nommu builds with 48be69a0 (ARM: move signal handlers into a vdso-like page) · 8c0cc8a5
      Russell King 提交于
      Olof reports that noMMU builds error out with:
      
      arch/arm/kernel/signal.c: In function 'setup_return':
      arch/arm/kernel/signal.c:413:25: error: 'mm_context_t' has no member named 'sigpage'
      
      This shows one of the evilnesses of IS_ENABLED().  Get rid of it here
      and replace it with #ifdef's - and as no noMMU platform can make use
      of sigpage, depend on CONIFG_MMU not CONFIG_ARM_MPU.
      Reported-by: NOlof Johansson <olof@lixom.net>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      8c0cc8a5
    • R
      ARM: fix a cockup in 48be69a0 (ARM: move signal handlers into a vdso-like page) · e0d40756
      Russell King 提交于
      Unfortunately, I never committed the fix to a nasty oops which can
      occur as a result of that commit:
      
      ------------[ cut here ]------------
      kernel BUG at /home/olof/work/batch/include/linux/mm.h:414!
      Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
      Modules linked in:
      CPU: 0 PID: 490 Comm: killall5 Not tainted 3.11.0-rc3-00288-gabe03080 #53
      task: e90acac0 ti: e9be8000 task.ti: e9be8000
      PC is at special_mapping_fault+0xa4/0xc4
      LR is at __do_fault+0x68/0x48c
      
      This doesn't show up unless you do quite a bit of testing; a simple
      boot test does not do this, so all my nightly tests were passing fine.
      
      The reason for this is that install_special_mapping() expects the
      page array to stick around, and as this was only inserting one page
      which was stored on the kernel stack, that's why this was blowing up.
      Reported-by: NOlof Johansson <olof@lixom.net>
      Tested-by: NOlof Johansson <olof@lixom.net>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      e0d40756
    • S
      serial: st-asc: Fix unused variable warning for non DT. · a4f2dc9e
      Srinivas Kandagatla 提交于
      This patch fixes a below warning reported by kbuild test robot.
      
      drivers/tty/serial/st-asc.c:727:28: warning: 'asc_match' defined but
       not used [-Wunused-variable]
      
      The code used in DT case is now ifdefed under CONFIG_OF to fix this
      warning.
      Signed-off-by: NSrinivas Kandagatla <srinivas.kandagatla@st.com>
      Reported-by: NKbuild Test Robot <fengguang.wu@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a4f2dc9e
    • P
      netlabel: use domain based selectors when address based selectors are not available · 6a8b7f0c
      Paul Moore 提交于
      NetLabel has the ability to selectively assign network security labels
      to outbound traffic based on either the LSM's "domain" (different for
      each LSM), the network destination, or a combination of both.  Depending
      on the type of traffic, local or forwarded, and the type of traffic
      selector, domain or address based, different hooks are used to label the
      traffic; the goal being minimal overhead.
      
      Unfortunately, there is a bug such that a system using NetLabel domain
      based traffic selectors does not correctly label outbound local traffic
      that is not assigned to a socket.  The issue is that in these cases
      the associated NetLabel hook only looks at the address based selectors
      and not the domain based selectors.  This patch corrects this by
      checking both the domain and address based selectors so that the correct
      labeling is applied, regardless of the configuration type.
      
      In order to acomplish this fix, this patch also simplifies some of the
      NetLabel domainhash structures to use a more common outbound traffic
      mapping type: struct netlbl_dommap_def.  This simplifies some of the code
      in this patch and paves the way for further simplifications in the
      future.
      Signed-off-by: NPaul Moore <pmoore@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6a8b7f0c
    • R
      net: check net.core.somaxconn sysctl values · 5f671d6b
      Roman Gushchin 提交于
      It's possible to assign an invalid value to the net.core.somaxconn
      sysctl variable, because there is no checks at all.
      
      The sk_max_ack_backlog field of the sock structure is defined as
      unsigned short. Therefore, the backlog argument in inet_listen()
      shouldn't exceed USHRT_MAX. The backlog argument in the listen() syscall
      is truncated to the somaxconn value. So, the somaxconn value shouldn't
      exceed 65535 (USHRT_MAX).
      Also, negative values of somaxconn are meaningless.
      
      before:
      $ sysctl -w net.core.somaxconn=256
      net.core.somaxconn = 256
      $ sysctl -w net.core.somaxconn=65536
      net.core.somaxconn = 65536
      $ sysctl -w net.core.somaxconn=-100
      net.core.somaxconn = -100
      
      after:
      $ sysctl -w net.core.somaxconn=256
      net.core.somaxconn = 256
      $ sysctl -w net.core.somaxconn=65536
      error: "Invalid argument" setting key "net.core.somaxconn"
      $ sysctl -w net.core.somaxconn=-100
      error: "Invalid argument" setting key "net.core.somaxconn"
      
      Based on a prior patch from Changli Gao.
      Signed-off-by: NRoman Gushchin <klamm@yandex-team.ru>
      Reported-by: NChangli Gao <xiaosuo@gmail.com>
      Suggested-by: NEric Dumazet <edumazet@google.com>
      Acked-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5f671d6b
    • D
      sis900: Fix the tx queue timeout issue · 3508ea33
      Denis Kirjanov 提交于
      [  198.720048] ------------[ cut here ]------------
      [  198.720108] WARNING: CPU: 0 PID: 0 at net/sched/sch_generic.c:255 dev_watchdog+0x229/0x240()
      [  198.720118] NETDEV WATCHDOG: eth0 (sis900): transmit queue 0 timed out
      [  198.720125] Modules linked in: bridge stp llc dmfe sundance 3c59x sis900 mii
      [  198.720159] CPU: 0 PID: 0 Comm: swapper Not tainted 3.11.0-rc3+ #12
      [  198.720167] Hardware name: System Manufacturer System Name/TUSI-M, BIOS ASUS TUSI-M ACPI BIOS
      Revision 1013 Beta 001 12/14/2001
      [  198.720175]  000000ff c13fa6b9 c169ddcc c12208d6 c169ddf8 c1031e4d c1664a84 c169de24
      [  198.720197]  00000000 c165f5ea 000000ff c13fa6b9 00000001 000000ff c1664a84 c169de10
      [  198.720217]  c1031f13 00000009 c169de08 c1664a84 c169de24 c169de50 c13fa6b9 c165f5ea
      [  198.720240] Call Trace:
      [  198.720257]  [<c13fa6b9>] ? dev_watchdog+0x229/0x240
      [  198.720274]  [<c12208d6>] dump_stack+0x16/0x20
      [  198.720306]  [<c1031e4d>] warn_slowpath_common+0x7d/0xa0
      [  198.720318]  [<c13fa6b9>] ? dev_watchdog+0x229/0x240
      [  198.720330]  [<c1031f13>] warn_slowpath_fmt+0x33/0x40
      [  198.720342]  [<c13fa6b9>] dev_watchdog+0x229/0x240
      [  198.720357]  [<c103f158>] call_timer_fn+0x78/0x150
      [  198.720369]  [<c103f0e0>] ? internal_add_timer+0x40/0x40
      [  198.720381]  [<c13fa490>] ? dev_init_scheduler+0xa0/0xa0
      [  198.720392]  [<c103f33f>] run_timer_softirq+0x10f/0x200
      [  198.720412]  [<c103954f>] ? __do_softirq+0x6f/0x210
      [  198.720424]  [<c13fa490>] ? dev_init_scheduler+0xa0/0xa0
      [  198.720435]  [<c1039598>] __do_softirq+0xb8/0x210
      [  198.720467]  [<c14b54d2>] ? _raw_spin_unlock+0x22/0x30
      [  198.720484]  [<c1003245>] ? handle_irq+0x25/0xd0
      [  198.720496]  [<c1039c0c>] irq_exit+0x9c/0xb0
      [  198.720508]  [<c14bc9d7>] do_IRQ+0x47/0x94
      [  198.720534]  [<c1056078>] ? hrtimer_start+0x28/0x30
      [  198.720564]  [<c14bc8b1>] common_interrupt+0x31/0x38
      [  198.720589]  [<c1008692>] ? default_idle+0x22/0xa0
      [  198.720600]  [<c10083c7>] arch_cpu_idle+0x17/0x30
      [  198.720631]  [<c106d23d>] cpu_startup_entry+0xcd/0x180
      [  198.720643]  [<c14ae30a>] rest_init+0xaa/0xb0
      [  198.720654]  [<c14ae260>] ? reciprocal_value+0x50/0x50
      [  198.720668]  [<c17044e0>] ? repair_env_string+0x60/0x60
      [  198.720679]  [<c1704bda>] start_kernel+0x29a/0x350
      [  198.720690]  [<c17044e0>] ? repair_env_string+0x60/0x60
      [  198.720721]  [<c1704269>] i386_start_kernel+0x39/0xa0
      [  198.720729] ---[ end trace 81e0a6266f5c73a8 ]---
      [  198.720740] eth0: Transmit timeout, status 00000204 00000000
      
      timer routine checks the link status and if it's up calls
      netif_carrier_on() allowing upper layer to start the tx queue
      even if the auto-negotiation process is not finished.
      
      Also remove ugly auto-negotiation check from the sis900_start_xmit()
      
      CC: Duan Fugang <B38611@freescale.com>
      CC: Ben Hutchings <bhutchings@solarflare.com>
      Signed-off-by: NDenis Kirjanov <kda@linux-powerpc.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3508ea33