1. 18 Dec, 2013 1 commit
    • Soren Brinkmann's avatar
      tty: xuartps: Properly guard sysrq specific code · c2db11ec
      Soren Brinkmann authored
      Commit 'tty: xuartps: Implement BREAK detection, add SYSRQ support'
      (0c0c47bc) introduced sysrq support
      without properly guarding sysrq specific code which results in build
      errors when sysrq is disabled:
      	DNAME=KBUILD_STR(xilinx_uartps)" -c -o
      	drivers/tty/serial/.tmp_xilinx_uartps.o
      	drivers/tty/serial/xilinx_uartps.c
      	drivers/tty/serial/xilinx_uartps.c: In function 'xuartps_isr':
      	drivers/tty/serial/xilinx_uartps.c:247:5: error: 'struct uart_port'
      	has no member named 'sysrq'
      	drivers/tty/serial/xilinx_uartps.c:247:5: error: 'struct uart_port'
      	has no member named 'sysrq'
      	drivers/tty/serial/xilinx_uartps.c:247:5: error: 'struct uart_port'
      	has no member named 'sysrq'
      	make[3]: *** [drivers/tty/serial/xilinx_uartps.o] Error 1
      Reported-by: default avatarMasanari Iida <standby24x7@gmail.com>
      Cc: Vlad Lungu <vlad.lungu@windriver.com>
      Signed-off-by: default avatarSoren Brinkmann <soren.brinkmann@xilinx.com>
      Signed-off-by: default avatarMark Brown <broonie@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c2db11ec
  2. 17 Dec, 2013 4 commits
    • Peter Hurley's avatar
      n_tty: Fix apparent order of echoed output · 1075a6e2
      Peter Hurley authored
      With block processing of echoed output, observed output order is still
      required. Push completed echoes and echo commands prior to output.
      
      Introduce echo_mark echo buffer index, which tracks completed echo
      commands; ie., those submitted via commit_echoes but which may not
      have been committed. Ensure that completed echoes are output prior
      to subsequent terminal writes in process_echoes().
      
      Fixes newline/prompt output order in cooked mode shell.
      
      Cc: <stable@vger.kernel.org> # 3.12.x : 39434abd n_tty: Fix missing newline echo
      Reported-by: default avatarKarl Dahlke <eklhad@comcast.net>
      Reported-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: default avatarPeter Hurley <peter@hurleysoftware.com>
      Tested-by: default avatarKarl Dahlke <eklhad@comcast.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      1075a6e2
    • Mika Westerberg's avatar
      serial: 8250_dw: add new ACPI IDs · d24c195f
      Mika Westerberg authored
      Newer Intel PCHs with LPSS have the same Designware controllers than
      Haswell but ACPI IDs are different. Add these IDs to the driver list.
      Signed-off-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d24c195f
    • James Hogan's avatar
      serial: 8250_dw: Fix LCR workaround regression · 6979f8d2
      James Hogan authored
      Commit c49436b6 (serial: 8250_dw: Improve unwritable LCR workaround)
      caused a regression. It added a check that the LCR was written properly
      to detect and workaround the busy quirk, but the behaviour of bit 5
      (UART_LCR_SPAR) differs between IP versions 3.00a and 3.14c per the
      docs. On older versions this caused the check to fail and it would
      repeatedly force idle and rewrite the LCR register, causing delays and
      preventing any input from serial being received.
      
      This is fixed by masking out UART_LCR_SPAR before making the comparison.
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Jiri Slaby <jslaby@suse.cz>
      Cc: Tim Kryger <tim.kryger@linaro.org>
      Cc: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
      Cc: Matt Porter <matt.porter@linaro.org>
      Cc: Markus Mayer <markus.mayer@linaro.org>
      Tested-by: default avatarTim Kryger <tim.kryger@linaro.org>
      Tested-by: default avatarEzequiel Garcia <ezequiel.garcia@free-electrons.com>
      Tested-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6979f8d2
    • Peter Hurley's avatar
      tty: Fix hang at ldsem_down_read() · cf872776
      Peter Hurley authored
      When a controlling tty is being hung up and the hang up is
      waiting for a just-signalled tty reader or writer to exit, and a new tty
      reader/writer tries to acquire an ldisc reference concurrently with the
      ldisc reference release from the signalled reader/writer, the hangup
      can hang. The new reader/writer is sleeping in ldsem_down_read() and the
      hangup is sleeping in ldsem_down_write() [1].
      
      The new reader/writer fails to wakeup the waiting hangup because the
      wrong lock count value is checked (the old lock count rather than the new
      lock count) to see if the lock is unowned.
      
      Change helper function to return the new lock count if the cmpxchg was
      successful; document this behavior.
      
      [1] edited dmesg log from reporter
      
      SysRq : Show Blocked State
        task                        PC stack   pid father
      systemd         D ffff88040c4f0000     0     1      0 0x00000000
       ffff88040c49fbe0 0000000000000046 ffff88040c4a0000 ffff88040c49ffd8
       00000000001d3980 00000000001d3980 ffff88040c4a0000 ffff88040593d840
       ffff88040c49fb40 ffffffff810a4cc0 0000000000000006 0000000000000023
      Call Trace:
       [<ffffffff810a4cc0>] ? sched_clock_cpu+0x9f/0xe4
       [<ffffffff810a4cc0>] ? sched_clock_cpu+0x9f/0xe4
       [<ffffffff810a4cc0>] ? sched_clock_cpu+0x9f/0xe4
       [<ffffffff810a4cc0>] ? sched_clock_cpu+0x9f/0xe4
       [<ffffffff817a6649>] schedule+0x24/0x5e
       [<ffffffff817a588b>] schedule_timeout+0x15b/0x1ec
       [<ffffffff810a4cc0>] ? sched_clock_cpu+0x9f/0xe4
       [<ffffffff817aa691>] ? _raw_spin_unlock_irq+0x24/0x26
       [<ffffffff817aa10c>] down_read_failed+0xe3/0x1b9
       [<ffffffff817aa26d>] ldsem_down_read+0x8b/0xa5
       [<ffffffff8142b5ca>] ? tty_ldisc_ref_wait+0x1b/0x44
       [<ffffffff8142b5ca>] tty_ldisc_ref_wait+0x1b/0x44
       [<ffffffff81423f5b>] tty_write+0x7d/0x28a
       [<ffffffff814241f5>] redirected_tty_write+0x8d/0x98
       [<ffffffff81424168>] ? tty_write+0x28a/0x28a
       [<ffffffff8115d03f>] do_loop_readv_writev+0x56/0x79
       [<ffffffff8115e604>] do_readv_writev+0x1b0/0x1ff
       [<ffffffff8116ea0b>] ? do_vfs_ioctl+0x32a/0x489
       [<ffffffff81167d9d>] ? final_putname+0x1d/0x3a
       [<ffffffff8115e6c7>] vfs_writev+0x2e/0x49
       [<ffffffff8115e7d3>] SyS_writev+0x47/0xaa
       [<ffffffff817ab822>] system_call_fastpath+0x16/0x1b
      bash            D ffffffff81c104c0     0  5469   5302 0x00000082
       ffff8800cf817ac0 0000000000000046 ffff8804086b22a0 ffff8800cf817fd8
       00000000001d3980 00000000001d3980 ffff8804086b22a0 ffff8800cf817a48
       000000000000b9a0 ffff8800cf817a78 ffffffff81004675 ffff8800cf817a44
      Call Trace:
       [<ffffffff81004675>] ? dump_trace+0x165/0x29c
       [<ffffffff810a4cc0>] ? sched_clock_cpu+0x9f/0xe4
       [<ffffffff8100edda>] ? save_stack_trace+0x26/0x41
       [<ffffffff817a6649>] schedule+0x24/0x5e
       [<ffffffff817a588b>] schedule_timeout+0x15b/0x1ec
       [<ffffffff810a4cc0>] ? sched_clock_cpu+0x9f/0xe4
       [<ffffffff817a9f03>] ? down_write_failed+0xa3/0x1c9
       [<ffffffff817aa691>] ? _raw_spin_unlock_irq+0x24/0x26
       [<ffffffff817a9f0b>] down_write_failed+0xab/0x1c9
       [<ffffffff817aa300>] ldsem_down_write+0x79/0xb1
       [<ffffffff817aada3>] ? tty_ldisc_lock_pair_timeout+0xa5/0xd9
       [<ffffffff817aada3>] tty_ldisc_lock_pair_timeout+0xa5/0xd9
       [<ffffffff8142bf33>] tty_ldisc_hangup+0xc4/0x218
       [<ffffffff81423ab3>] __tty_hangup+0x2e2/0x3ed
       [<ffffffff81424a76>] disassociate_ctty+0x63/0x226
       [<ffffffff81078aa7>] do_exit+0x79f/0xa11
       [<ffffffff81086bdb>] ? get_signal_to_deliver+0x206/0x62f
       [<ffffffff810b4bfb>] ? lock_release_holdtime.part.8+0xf/0x16e
       [<ffffffff81079b05>] do_group_exit+0x47/0xb5
       [<ffffffff81086c16>] get_signal_to_deliver+0x241/0x62f
       [<ffffffff810020a7>] do_signal+0x43/0x59d
       [<ffffffff810f2af7>] ? __audit_syscall_exit+0x21a/0x2a8
       [<ffffffff810b4bfb>] ? lock_release_holdtime.part.8+0xf/0x16e
       [<ffffffff81002655>] do_notify_resume+0x54/0x6c
       [<ffffffff817abaf8>] int_signal+0x12/0x17
      Reported-by: default avatarSami Farin <sami.farin@gmail.com>
      Cc: <stable@vger.kernel.org> # 3.12.x
      Signed-off-by: default avatarPeter Hurley <peter@hurleysoftware.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      cf872776
  3. 15 Dec, 2013 10 commits
    • Linus Torvalds's avatar
      Linux 3.13-rc4 · 319e2e3f
      Linus Torvalds authored
      319e2e3f
    • Matias Bjorling's avatar
      null_blk: mem garbage on NUMA systems during init · 57053d8c
      Matias Bjorling authored
      For NUMA systems, initializing the blk-mq layer and using per node hctx.
      We initialize submit queues to 1, while blk-mq nr_hw_queues is
      initialized to the number of NUMA nodes.
      
      This makes the null_init_hctx function overwrite memory outside of what
      it allocated.  In my case it lead to writing garbage into struct
      request_queue's mq_map.
      Signed-off-by: default avatarMatias Bjorling <m@bjorling.me>
      Cc: Jens Axboe <axboe@kernel.dk>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      57053d8c
    • Sergey Senozhatsky's avatar
      radeon_pm: fix oops in hwmon_attributes_visible() and radeon_hwmon_show_temp_thresh() · e4158f1b
      Sergey Senozhatsky authored
      Since commit ec39f64b ("drm/radeon/dpm: Convert to use
      devm_hwmon_register_with_groups") radeon_hwmon_init() is using
      hwmon_device_register_with_groups(), which sets `rdev' as a device
      private driver_data, while hwmon_attributes_visible() and
      radeon_hwmon_show_temp_thresh() are still waiting for `drm_device'.
      
      Fix them by using dev_get_drvdata(), in order to avoid this oops:
      
        BUG: unable to handle kernel paging request at 0000000000001e28
        IP: [<ffffffffa02ae8b4>] hwmon_attributes_visible+0x18/0x3d [radeon]
        PGD 15057e067 PUD 151a8e067 PMD 0
        Oops: 0000 [#1] PREEMPT SMP
        Call Trace:
          internal_create_group+0x114/0x1d9
          sysfs_create_group+0xe/0x10
          sysfs_create_groups+0x22/0x5f
          device_add+0x34f/0x501
          device_register+0x15/0x18
          hwmon_device_register_with_groups+0xb5/0xed
          radeon_hwmon_init+0x56/0x7c [radeon]
          radeon_pm_init+0x134/0x7e5 [radeon]
          radeon_modeset_init+0x75f/0x8ed [radeon]
          radeon_driver_load_kms+0xc6/0x187 [radeon]
          drm_dev_register+0xf9/0x1b4 [drm]
          drm_get_pci_dev+0x98/0x129 [drm]
          radeon_pci_probe+0xa3/0xac [radeon]
          pci_device_probe+0x6e/0xcf
          driver_probe_device+0x98/0x1c4
          __driver_attach+0x5c/0x7e
          bus_for_each_dev+0x7b/0x85
          driver_attach+0x19/0x1b
          bus_add_driver+0x104/0x1ce
          driver_register+0x89/0xc5
          __pci_register_driver+0x58/0x5b
          drm_pci_init+0x86/0xea [drm]
          radeon_init+0x97/0x1000 [radeon]
          do_one_initcall+0x7f/0x117
          load_module+0x1583/0x1bb4
          SyS_init_module+0xa0/0xaf
      Signed-off-by: default avatarSergey Senozhatsky <sergey.senozhatsky@gmail.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Alexander Deucher <Alexander.Deucher@amd.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e4158f1b
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 4a251dd2
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Revert CHECKSUM_COMPLETE optimization in pskb_trim_rcsum(), I can't
          figure out why it breaks things.
      
       2) Fix comparison in netfilter ipset's hash_netnet4_data_equal(), it
          was basically doing "x == x", from Dave Jones.
      
       3) Freescale FEC driver was DMA mapping the wrong number of bytes, from
          Sebastian Siewior.
      
       4) Blackhole and prohibit routes in ipv6 were not doing the right thing
          because their ->input and ->output methods were not being assigned
          correctly.  Now they behave properly like their ipv4 counterparts.
          From Kamala R.
      
       5) Several drivers advertise the NETIF_F_FRAGLIST capability, but
          really do not support this feature and will send garbage packets if
          fed fraglist SKBs.  From Eric Dumazet.
      
       6) Fix long standing user triggerable BUG_ON over loopback in RDS
          protocol stack, from Venkat Venkatsubra.
      
       7) Several not so common code paths can potentially try to invoke
          packet scheduler actions that might be NULL without checking.  Shore
          things up by either 1) defining a method as mandatory and erroring
          on registration if that method is NULL 2) defininig a method as
          optional and the registration function hooks up a default
          implementation when NULL is seen.  From Jamal Hadi Salim.
      
       8) Fix fragment detection in xen-natback driver, from Paul Durrant.
      
       9) Kill dangling enter_memory_pressure method in cg_proto ops, from
          Eric W Biederman.
      
      10) SKBs that traverse namespaces should have their local_df cleared,
          from Hannes Frederic Sowa.
      
      11) IOCB file position is not being updated by macvtap_aio_read() and
          tun_chr_aio_read().  From Zhi Yong Wu.
      
      12) Don't free virtio_net netdev before releasing all of the NAPI
          instances.  From Andrey Vagin.
      
      13) Procfs entry leak in xt_hashlimit, from Sergey Popovich.
      
      14) IPv6 routes that are no cached routes should not count against the
          garbage collection limits.  We had this almost right, but were
          missing handling addrconf generated routes properly.  From Hannes
          Frederic Sowa.
      
      15) fib{4,6}_rule_suppress() have to consider potentially seeing NULL
          route info when they are called, from Stefan Tomanek.
      
      16) TUN and MACVTAP have had truncated packet signalling for some time,
          fix from Jason Wang.
      
      17) Fix use after frrr in __udp4_lib_rcv(), from Eric Dumazet.
      
      18) xen-netback does not interpret the NAPI budget properly for TX work,
          fix from Paul Durrant.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (132 commits)
        igb: Fix for issue where values could be too high for udelay function.
        i40e: fix null dereference
        xen-netback: fix gso_prefix check
        net: make neigh_priv_len in struct net_device 16bit instead of 8bit
        drivers: net: cpsw: fix for cpsw crash when build as modules
        xen-netback: napi: don't prematurely request a tx event
        xen-netback: napi: fix abuse of budget
        sch_tbf: use do_div() for 64-bit divide
        udp: ipv4: must add synchronization in udp_sk_rx_dst_set()
        net:fec: remove duplicate lines in comment about errata ERR006358
        Revert "8390 : Replace ei_debug with msg_enable/NETIF_MSG_* feature"
        8390 : Replace ei_debug with msg_enable/NETIF_MSG_* feature
        xen-netback: make sure skb linear area covers checksum field
        net: smc91x: Fix device tree based configuration so it's usable
        udp: ipv4: fix potential use after free in udp_v4_early_demux()
        macvtap: signal truncated packets
        tun: unbreak truncated packet signalling
        net: sched: htb: fix the calculation of quantum
        net: sched: tbf: fix the calculation of max_size
        micrel: add support for KSZ8041RNLI
        ...
      4a251dd2
    • Linus Torvalds's avatar
      Merge branch 'x86/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 908bfda7
      Linus Torvalds authored
      Pull x86 fixes from Peter Anvin:
       "This is a pretty small batch:
      
        The biggest single change is to stop using EFI time services on 32-bit
        platforms.  This matches our current behavior on 64-bit platforms as
        we already had ruled them out there as being too unreliable.  Turns
        out that affects 32-bit platforms, too.
      
        One NULL pointer fix for SGI UV.
      
        Two minor build fixes, one of which only affects icc and the other
        which affects icc and future versions or nonstandard default settings
        of gcc"
      
      * 'x86/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86, efi: Don't use (U)EFI time services on 32 bit
        x86, build, icc: Remove uninitialized_var() from compiler-intel.h
        x86/UV: Fix NULL pointer dereference in uv_flush_tlb_others() if the 'nobau' boot option is used
        x86, build: Pass in additional -mno-mmx, -mno-sse options
      908bfda7
    • Linus Torvalds's avatar
      Merge tag 'pci-v3.13-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci · 9199c4ca
      Linus Torvalds authored
      Pull PCI updates from Bjorn Helgaas:
       "PCI device hotplug
          - Move device_del() from pci_stop_dev() to pci_destroy_dev() (Rafael
            Wysocki)
      
        Host bridge drivers
          - Update maintainers for DesignWare, i.MX6, Armada, R-Car (Bjorn
            Helgaas)
          - mvebu: Return 'unsupported' for Interrupt Line and Interrupt Pin
            (Jason Gunthorpe)
      
        Miscellaneous
          - Avoid unnecessary CPU switch when calling .probe() (Alexander
            Duyck)
          - Revert "workqueue: allow work_on_cpu() to be called recursively"
            (Bjorn Helgaas)
          - Disable Bus Master only on kexec reboot (Khalid Aziz)
          - Omit PCI ID macro strings to shorten quirk names for LTO (Michal
            Marek)"
      
      * tag 'pci-v3.13-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
        MAINTAINERS: Add DesignWare, i.MX6, Armada, R-Car PCI host maintainers
        PCI: Disable Bus Master only on kexec reboot
        PCI: mvebu: Return 'unsupported' for Interrupt Line and Interrupt Pin
        PCI: Omit PCI ID macro strings to shorten quirk names
        PCI: Move device_del() from pci_stop_dev() to pci_destroy_dev()
        Revert "workqueue: allow work_on_cpu() to be called recursively"
        PCI: Avoid unnecessary CPU switch when calling driver .probe() method
      9199c4ca
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security · b5745c59
      Linus Torvalds authored
      Pull SELinux fixes from James Morris.
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
        selinux: process labeled IPsec TCP SYN-ACK packets properly in selinux_ip_postroute()
        selinux: look for IPsec labels on both inbound and outbound packets
        selinux: handle TCP SYN-ACK packets correctly in selinux_ip_postroute()
        selinux: handle TCP SYN-ACK packets correctly in selinux_ip_output()
        selinux: fix possible memory leak
      b5745c59
    • Linus Torvalds's avatar
      Revert "selinux: consider filesystem subtype in policies" · 29b1deb2
      Linus Torvalds authored
      This reverts commit 102aefdd.
      
      Tom London reports that it causes sync() to hang on Fedora rawhide:
      
        https://bugzilla.redhat.com/show_bug.cgi?id=1033965
      
      and Josh Boyer bisected it down to this commit.  Reverting the commit in
      the rawhide kernel fixes the problem.
      
      Eric Paris root-caused it to incorrect subtype matching in that commit
      breaking fuse, and has a tentative patch, but by now we're better off
      retrying this in 3.14 rather than playing with it any more.
      Reported-by: default avatarTom London <selinux@gmail.com>
      Bisected-by: default avatarJosh Boyer <jwboyer@fedoraproject.org>
      Acked-by: default avatarEric Paris <eparis@redhat.com>
      Cc: James Morris <jmorris@namei.org>
      Cc: Anand Avati <avati@redhat.com>
      Cc: Paul Moore <paul@paul-moore.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      29b1deb2
    • Carolyn Wyborny's avatar
      igb: Fix for issue where values could be too high for udelay function. · df29df92
      Carolyn Wyborny authored
      This patch changes the igb_phy_has_link function to check the value of the
      parameter before deciding to use udelay or mdelay in order to be sure that
      the value is not too high for udelay function.
      
      CC: stable kernel <stable@vger.kernel.org> # 3.9+
      Signed-off-by: default avatarSunil K Pandey <sunil.k.pandey@intel.com>
      Signed-off-by: default avatarKevin B Smith <kevin.b.smith@intel.com>
      Signed-off-by: default avatarCarolyn Wyborny <carolyn.wyborny@intel.com>
      Tested-by: default avatarAaron Brown <aaron.f.brown@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      df29df92
    • Jesse Brandeburg's avatar
      i40e: fix null dereference · 3c325ced
      Jesse Brandeburg authored
      If the vsi->tx_rings structure is NULL we don't want to panic.
      
      Change-Id: Ic694f043701738c434e8ebe0caf0673f4410dc10
      Signed-off-by: default avatarJesse Brandeburg <jesse.brandeburg@intel.com>
      Tested-by: default avatarKavindya Deegala <kavindya.s.deegala@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3c325ced
  4. 14 Dec, 2013 3 commits
  5. 13 Dec, 2013 22 commits