1. 08 Oct, 2017 1 commit
  2. 01 Oct, 2017 1 commit
  3. 30 Sep, 2017 1 commit
  4. 25 Sep, 2017 2 commits
  5. 24 Sep, 2017 13 commits
  6. 22 Sep, 2017 2 commits
  7. 18 Sep, 2017 6 commits
    • Stefan Wahren's avatar
      staging: vchiq_2835_arm: Fix NULL ptr dereference in free_pagelist · 974d4d03
      Stefan Wahren authored
      This fixes a NULL pointer dereference on RPi 2 with multi_v7_defconfig.
      The function page_address() could return NULL with enabled CONFIG_HIGHMEM.
      So fix this by using kmap() instead.
      Signed-off-by: default avatarStefan Wahren <stefan.wahren@i2se.com>
      Fixes: 71bad7f0 ("staging: add bcm2708 vchiq driver")
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    • Okash Khawaja's avatar
      staging: speakup: fix speakup-r empty line lockup · e5f5d0e2
      Okash Khawaja authored
      When cursor is at beginning of an empty or whitespace-only line and
      speakup-r typed, kernel locks up. This happens because deadlock of in
      input_event function over dev->event_lock, as demonstrated by lockdep
      logs. The reason for that is speakup simulates a down arrow - because
      cursor is at an empty line - while inside key press notifier handler
      which is ultimately triggered from input_event function. The simulated
      key press leads to input_event being called again, this time under its
      own context. So the spinlock is dev->event_lock is acquired while still
      being held.
      This patch ensures that key press is not simulated from inside key press
      notifier handler. Instead it delegates to cursor_timer. It starts the
      timer and passes RA_DOWN_ARROW as argument. When timer handler runs and
      sees RA_DOWN_ARROW, it will then call kbd_fakekey2(RA_DOWN_ARROW) which
      will correctly simulate the keypress inside timer context.
      When not inside key press notifier callback, the behaviour will remain
      the same as before this patch.
      Signed-off-by: default avatarOkash Khawaja <okash.khawaja@gmail.com>
      Reviewed-by: default avatarSamuel Thibault <samuel.thibault@ens-lyon.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    • Geert Uytterhoeven's avatar
      staging: pi433: Move limit check to switch default to kill warning · b72703e2
      Geert Uytterhoeven authored
      With gcc-4.1.2:
          drivers/staging/pi433/rf69.c: In function ‘rf69_set_dio_mapping’:
          drivers/staging/pi433/rf69.c:566: warning: ‘regaddr’ may be used uninitialized in this function
          drivers/staging/pi433/rf69.c:565: warning: ‘shift’ may be used uninitialized in this function
          drivers/staging/pi433/rf69.c:564: warning: ‘mask’ may be used uninitialized in this function
      While this is a false positive, it can easily be fixed by moving the
      limit check into the "default" case of the switch statement.
      Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    • Colin Ian King's avatar
      staging: r8822be: fix null pointer dereferences with a null driver_adapter · e1bf2886
      Colin Ian King authored
      The call to _rtl_dbg_trace via macro HALMAC_RT_TRACE will trigger a null
      pointer deference on a null driver_adapter.  Fix this by assigning
      driver_adapter earlier to halmac_adapter->driver_adapter before the tracing
      call so that a non-null driver_adapter is passed instead.
      I should have spotted these with an earlier patch I sent, but I overlooked
      these in the rather large CoverityScan logs.
      Detected by CoverityScan, CID#1454550, CID#1454554, CID#1454565,
      CID#1454591, CID#1454598 ("Explicit null dereferenced")
      Fixes: 938a0447 ("staging: r8822be: Add code for halmac sub-driver")
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    • Arun Nagendran's avatar
      staging: mt29f_spinand: Enable the read ECC before program the page · a3563b09
      Arun Nagendran authored
      Current program_page function did following operation:
      1. read page (with ECC OFF)
      2. modify the page
      3. write the page (with ECC ON)
      For some case(buggy flash Chip), while read the page without ECC ON,
      we may read the page with bit flip error and modify that bad page without
      knowing the bit flip error on that page.
      also we re-calculate the hash for bad page and write it.
      This could bring potential in-consistency problem with Flash data.
      Verify this logic with GIGA DEVICE Part(GD5F2GQ4RCFIG):
      we see this in-conststency problem wit Giga Device and fix on
      this patch resovle that issue.
      Signed-off-by: default avatarArun Nagendran <arunrasppi@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    • Arnd Bergmann's avatar
      staging: unisys/visorbus: add __init/__exit annotations · 056e4fc2
      Arnd Bergmann authored
      gcc-4.6 causes a harmless warning about the init function:
      WARNING: vmlinux.o(.text+0xed62c2): Section mismatch in reference from the function init_unisys() to the function .init.text:visorutil_spar_detect()
      The function init_unisys() references
      the function __init visorutil_spar_detect().
      This is often because init_unisys lacks a __init
      annotation or the annotation of visorutil_spar_detect is wrong.
      It appears that newer versions inline visorutil_spar_detect(),
      end up with an empty __init section. This marks the module
      entry points as __init and __exit respectively, which avoids
      the warning and slightly reduces the runtime code size.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
  8. 16 Sep, 2017 2 commits
  9. 15 Sep, 2017 7 commits
    • Stephen Hemminger's avatar
      netvsc: increase default receive buffer size · 5023a6db
      Stephen Hemminger authored
      The default receive buffer size was reduced by recent change
      to a value which was appropriate for 10G and Windows Server 2016.
      But the value is too small for full performance with 40G on Azure.
      Increase the default back to maximum supported by host.
      Fixes: 8b532797 ("netvsc: allow controlling send/recv buffer size")
      Signed-off-by: default avatarStephen Hemminger <sthemmin@microsoft.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    • Geert Uytterhoeven's avatar
      net: smsc911x: Quieten netif during suspend · 2aa70f86
      Geert Uytterhoeven authored
      If the network interface is kept running during suspend, the net core
      may call net_device_ops.ndo_start_xmit() while the Ethernet device is
      still suspended, which may lead to a system crash.
      E.g. on sh73a0/kzm9g and r8a73a4/ape6evm, the external Ethernet chip is
      driven by a PM controlled clock.  If the Ethernet registers are accessed
      while the clock is not running, the system will crash with an imprecise
      external abort.
      As this is a race condition with a small time window, it is not so easy
      to trigger at will.  Using pm_test may increase your chances:
          # echo 0 > /sys/module/printk/parameters/console_suspend
          # echo platform > /sys/power/pm_test
          # echo mem > /sys/power/state
      To fix this, make sure the network interface is quietened during
      Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    • Florian Fainelli's avatar
      net: systemport: Fix 64-bit stats deadlock · 7095c973
      Florian Fainelli authored
      We can enter a deadlock situation because there is no sufficient protection
      when ndo_get_stats64() runs in process context to guard against RX or TX NAPI
      contexts running in softirq, this can lead to the following lockdep splat and
      actual deadlock was experienced as well with an iperf session in the background
      and a while loop doing ifconfig + ethtool.
      [    5.780350] ================================
      [    5.784679] WARNING: inconsistent lock state
      [    5.789011] 4.13.0-rc7-02179-g32fae27c725d #70 Not tainted
      [    5.794561] --------------------------------
      [    5.798890] inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage.
      [    5.804971] swapper/0/0 [HC0[0]:SC1[1]:HE0:SE0] takes:
      [    5.810175]  (&syncp->seq#2){+.?...}, at: [<c0768a28>] bcm_sysport_tx_reclaim+0x30/0x54
      [    5.818327] {SOFTIRQ-ON-W} state was registered at:
      [    5.823278]   bcm_sysport_get_stats64+0x17c/0x258
      [    5.828053]   dev_get_stats+0x38/0xac
      [    5.831776]   rtnl_fill_stats+0x30/0x118
      [    5.835761]   rtnl_fill_ifinfo+0x538/0xe24
      [    5.839921]   rtmsg_ifinfo_build_skb+0x6c/0xd8
      [    5.844430]   rtmsg_ifinfo_event.part.5+0x14/0x44
      [    5.849201]   rtmsg_ifinfo+0x20/0x28
      [    5.852837]   register_netdevice+0x628/0x6b8
      [    5.857171]   register_netdev+0x14/0x24
      [    5.861051]   bcm_sysport_probe+0x30c/0x438
      [    5.865280]   platform_drv_probe+0x50/0xb0
      [    5.869418]   driver_probe_device+0x2e8/0x450
      [    5.873817]   __driver_attach+0x104/0x120
      [    5.877871]   bus_for_each_dev+0x7c/0xc0
      [    5.881834]   bus_add_driver+0x1b0/0x270
      [    5.885797]   driver_register+0x78/0xf4
      [    5.889675]   do_one_initcall+0x54/0x190
      [    5.893646]   kernel_init_freeable+0x144/0x1d0
      [    5.898135]   kernel_init+0x8/0x110
      [    5.901665]   ret_from_fork+0x14/0x2c
      [    5.905363] irq event stamp: 24263
      [    5.908804] hardirqs last  enabled at (24262): [<c08eecf0>] net_rx_action+0xc4/0x4e4
      [    5.916624] hardirqs last disabled at (24263): [<c0a7da00>] _raw_spin_lock_irqsave+0x1c/0x98
      [    5.925143] softirqs last  enabled at (24258): [<c022a7fc>] irq_enter+0x84/0x98
      [    5.932524] softirqs last disabled at (24259): [<c022a918>] irq_exit+0x108/0x16c
      [    5.939985]
      [    5.939985] other info that might help us debug this:
      [    5.946576]  Possible unsafe locking scenario:
      [    5.946576]
      [    5.952556]        CPU0
      [    5.955031]        ----
      [    5.957506]   lock(&syncp->seq#2);
      [    5.960955]   <Interrupt>
      [    5.963604]     lock(&syncp->seq#2);
      [    5.967227]
      [    5.967227]  *** DEADLOCK ***
      [    5.967227]
      [    5.973222] 1 lock held by swapper/0/0:
      [    5.977092]  #0:  (&(&ring->lock)->rlock){..-...}, at: [<c0768a18>] bcm_sysport_tx_reclaim+0x20/0x54
      So just remove the u64_stats_update_begin()/end() pair in ndo_get_stats64()
      since it does not appear to be useful for anything. No inconsistency was
      observed with either ifconfig or ethtool, global TX counts equal the sum of
      per-queue TX counts on a 32-bit architecture.
      Fixes: 10377ba7 ("net: systemport: Support 64bit statistics")
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    • Arnd Bergmann's avatar
      net: vrf: avoid gcc-4.6 warning · ecf09117
      Arnd Bergmann authored
      When building an allmodconfig kernel with gcc-4.6, we get a rather
      odd warning:
      drivers/net/vrf.c: In function ‘vrf_ip6_input_dst’:
      drivers/net/vrf.c:964:3: error: initialized field with side-effects overwritten [-Werror]
      drivers/net/vrf.c:964:3: error: (near initialization for ‘fl6’) [-Werror]
      I have no idea what this warning is even trying to say, but it does
      seem like a false positive. Reordering the initialization in to match
      the structure definition gets rid of the warning, and might also avoid
      whatever gcc thinks is wrong here.
      Fixes: 9ff74384 ("net: vrf: Handle ipv6 multicast and link-local addresses")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    • Himanshu Jha's avatar
      qed: remove unnecessary call to memset · 4739df62
      Himanshu Jha authored
      call to memset to assign 0 value immediately after allocating
      memory with kzalloc is unnecesaary as kzalloc allocates the memory
      filled with 0 value.
      Semantic patch used to resolve this issue:
      expression e,e2; constant c;
      statement S;
        e = kzalloc(e2, c);
        if(e == NULL) S
      - memset(e, 0, e2);
      Signed-off-by: default avatarHimanshu Jha <himanshujha199640@gmail.com>
      Signed-off-by: default avatarHimanshu Jha <himanshujha199640@gmail.com>
      Acked-by: default avatarSudarsana Kalluru <sudarsana.kalluru@cavium.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    • Kai-Heng Feng's avatar
      Input: i8042 - add Gigabyte P57 to the keyboard reset table · 697c5d8a
      Kai-Heng Feng authored
      Similar to other Gigabyte laptops, the touchpad on P57 requires a
      keyboard reset to detect Elantech touchpad correctly.
      BugLink: https://bugs.launchpad.net/bugs/1594214Signed-off-by: default avatarKai-Heng Feng <kai.heng.feng@canonical.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
    • Bjorn Helgaas's avatar
      Revert "PCI: Avoid race while enabling upstream bridges" · 0f50a49e
      Bjorn Helgaas authored
      This reverts commit 40f11adc.
      Jens found that iwlwifi firmware loading failed on a Lenovo X1 Carbon,
        iwlwifi 0000:04:00.0: Direct firmware load for iwlwifi-8000C-34.ucode failed with error -2
        iwlwifi 0000:04:00.0: Direct firmware load for iwlwifi-8000C-33.ucode failed with error -2
        iwlwifi 0000:04:00.0: Direct firmware load for iwlwifi-8000C-32.ucode failed with error -2
        iwlwifi 0000:04:00.0: loaded firmware version 31.532993.0 op_mode iwlmvm
        iwlwifi 0000:04:00.0: Detected Intel(R) Dual Band Wireless AC 8260, REV=0x208
        iwlwifi 0000:04:00.0: Failed to load firmware chunk!
        iwlwifi 0000:04:00.0: Could not load the [0] uCode section
        iwlwifi 0000:04:00.0: Failed to start INIT ucode: -110
        iwlwifi 0000:04:00.0: Failed to run INIT ucode: -110
      He bisected it to 40f11adc ("PCI: Avoid race while enabling upstream
      bridges").  Revert that commit to fix the regression.
      Link: http://lkml.kernel.org/r/4bcbcbc1-7c79-09f0-5071-bc2f53bf6574@kernel.dk
      Fixes: 40f11adc ("PCI: Avoid race while enabling upstream bridges")
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      CC: Srinath Mannam <srinath.mannam@broadcom.com>
      CC: Jens Axboe <axboe@kernel.dk>
      CC: Luca Coelho <luca@coelho.fi>
      CC: Johannes Berg <johannes@sipsolutions.net>
      CC: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
  10. 14 Sep, 2017 5 commits