1. 24 9月, 2017 4 次提交
  2. 23 9月, 2017 22 次提交
  3. 22 9月, 2017 13 次提交
    • A
      IB/core: Fix for core panic · e6f9bc34
      Alex Estrin 提交于
      Build with the latest patches resulted in panic:
      11384.486289] BUG: unable to handle kernel NULL pointer dereference at
               (null)
      [11384.486293] IP:           (null)
      [11384.486295] PGD 0
      [11384.486295] P4D 0
      [11384.486296]
      [11384.486299] Oops: 0010 [#1] SMP
      ......... snip ......
      [11384.486401] CPU: 0 PID: 968 Comm: kworker/0:1H Tainted: G        W  O
          4.13.0-a-stream-20170825 #1
      [11384.486402] Hardware name: Intel Corporation S2600WT2R/S2600WT2R,
      BIOS SE5C610.86B.01.01.0014.121820151719 12/18/2015
      [11384.486418] Workqueue: ib-comp-wq ib_cq_poll_work [ib_core]
      [11384.486419] task: ffff880850579680 task.stack: ffffc90007fec000
      [11384.486420] RIP: 0010:          (null)
      [11384.486420] RSP: 0018:ffffc90007fef970 EFLAGS: 00010206
      [11384.486421] RAX: ffff88084cfe8000 RBX: ffff88084dce4000 RCX:
      ffffc90007fef978
      [11384.486422] RDX: 0000000000000000 RSI: 0000000000000001 RDI:
      ffff88084cfe8000
      [11384.486422] RBP: ffffc90007fefab0 R08: 0000000000000000 R09:
      ffff88084dce4080
      [11384.486423] R10: ffffffffa02d7f60 R11: 0000000000000000 R12:
      ffff88105af65a00
      [11384.486423] R13: ffff88084dce4000 R14: 000000000000c000 R15:
      000000000000c000
      [11384.486424] FS:  0000000000000000(0000) GS:ffff88085f400000(0000)
      knlGS:0000000000000000
      [11384.486425] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [11384.486425] CR2: 0000000000000000 CR3: 0000000001c09000 CR4:
      00000000001406f0
      [11384.486426] Call Trace:
      [11384.486431]  ? is_valid_mcast_lid.isra.21+0xfb/0x110 [ib_core]
      [11384.486436]  ib_attach_mcast+0x6f/0xa0 [ib_core]
      [11384.486441]  ipoib_mcast_attach+0x81/0x190 [ib_ipoib]
      [11384.486443]  ipoib_mcast_join_complete+0x354/0xb40 [ib_ipoib]
      [11384.486448]  mcast_work_handler+0x330/0x6c0 [ib_core]
      [11384.486452]  join_handler+0x101/0x220 [ib_core]
      [11384.486455]  ib_sa_mcmember_rec_callback+0x54/0x80 [ib_core]
      [11384.486459]  recv_handler+0x3a/0x60 [ib_core]
      [11384.486462]  ib_mad_recv_done+0x423/0x9b0 [ib_core]
      [11384.486466]  __ib_process_cq+0x5d/0xb0 [ib_core]
      [11384.486469]  ib_cq_poll_work+0x20/0x60 [ib_core]
      [11384.486472]  process_one_work+0x149/0x360
      [11384.486474]  worker_thread+0x4d/0x3c0
      [11384.486487]  kthread+0x109/0x140
      [11384.486488]  ? rescuer_thread+0x380/0x380
      [11384.486489]  ? kthread_park+0x60/0x60
      [11384.486490]  ? kthread_park+0x60/0x60
      [11384.486493]  ret_from_fork+0x25/0x30
      [11384.486493] Code:  Bad RIP value.
      [11384.486493] Code:  Bad RIP value.
      [11384.486496] RIP:           (null) RSP: ffffc90007fef970
      [11384.486497] CR2: 0000000000000000
      [11384.486531] ---[ end trace b1acec6fb4ff6e75 ]---
      [11384.532133] Kernel panic - not syncing: Fatal exception
      [11384.536541] Kernel Offset: disabled
      [11384.969491] ---[ end Kernel panic - not syncing: Fatal exception
      [11384.976875] sched: Unexpected reschedule of offline CPU#1!
      [11384.983646] ------------[ cut here ]------------
      
      Rdma device driver may not have implemented (*get_link_layer)()
      so it can not be called directly. Should use appropriate helper function.
      Reviewed-by: NYuval Shaia <yuval.shaia@oracle.com>
      Fixes: 52363335 ("IB/core: Fix the validations of a multicast LID in attach or detach operations")
      Cc: stable@kernel.org # 4.13
      Reviewed-by: NDennis Dalessandro <dennis.dalessandro@intel.com>
      Signed-off-by: NAlex Estrin <alex.estrin@intel.com>
      Signed-off-by: NDennis Dalessandro <dennis.dalessandro@intel.com>
      Reviewed-by: NLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      e6f9bc34
    • A
      drivers/perf: arm_pmu_acpi: Release memory obtained by kasprintf · a88dc7ba
      Arvind Yadav 提交于
      Free memory region, if arm_pmu_acpi_probe is not successful.
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NArvind Yadav <arvind.yadav.cs@gmail.com>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      a88dc7ba
    • R
      iommu/of: Remove PCI host bridge node check · c0d05cde
      Robin Murphy 提交于
      of_pci_iommu_init() tries to be clever and stop its alias walk at the
      device represented by master_np, in case of weird PCI topologies where
      the bridge to the IOMMU and the rest of the system is not at the root.
      It turns out this is a bit short-sighted, since there are plenty of
      other callers of pci_for_each_dma_alias() which would also need the same
      behaviour in that situation, and the only platform so far with such a
      topology (Cavium ThunderX2) already solves it more generally via a PCI
      quirk. As this check is effectively redundant, and returning a boolean
      value as an int is a bit broken anyway, let's just get rid of it.
      Reported-by: NJean-Philippe Brucker <jean-philippe.brucker@arm.com>
      Fixes: d87beb74 ("iommu/of: Handle PCI aliases properly")
      Signed-off-by: NRobin Murphy <robin.murphy@arm.com>
      Tested-by: NJean-Philippe Brucker <jean-philippe.brucker@arm.com>
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      c0d05cde
    • G
      net: phy: Fix truncation of large IRQ numbers in phy_attached_print() · 059fbe8b
      Geert Uytterhoeven 提交于
      Given NR_IRQS is 2048 on sparc64, and even 32784 on alpha, 3 digits is
      not enough to represent interrupt numbers on all architectures.  Hence
      PHY interrupt numbers may be truncated during printing.
      
      Increase the buffer size from 4 to 8 bytes to fix this.
      
      Fixes: 5e369aef ("net: stmmac: Delete dead code for MDIO registration")
      Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      059fbe8b
    • D
      Input: uinput - avoid crash when sending FF request to device going away · 6b4877c7
      Dmitry Torokhov 提交于
      If FF request comes in while uinput device is going away,
      uinput_request_send() will fail with -ENODEV, and uinput_request_submit()
      will attempt to mark the slot as unused by calling uinput_request_done().
      Unfortunately in this case we haven't initialized request->done completion
      yet, and we get a crash:
      
      [   39.402036] BUG: spinlock bad magic on CPU#1, fftest/3108
      [   39.402046]  lock: 0xffff88006a93bb00, .magic: 00000000, .owner: /39, .owner_cpu: 1217155072
      [   39.402055] CPU: 1 PID: 3108 Comm: fftest Tainted: G        W 4.13.0+ #15
      [   39.402059] Hardware name: LENOVO 20HQS0EG02/20HQS0EG02, BIOS N1MET37W (1.22 ) 07/04/2017
      [   39.402064]  0000000000000086 f0fad82f3ceaa120 ffff88006a93b9a0 ffffffff9de941bb
      [   39.402077]  ffff88026df8ae00 ffff88006a93bb00 ffff88006a93b9c0 ffffffff9dca62b7
      [   39.402088]  ffff88006a93bb00 ffff88006a93baf8 ffff88006a93b9e0 ffffffff9dca62e7
      [   39.402099] Call Trace:
      [   39.402112]  [<ffffffff9de941bb>] dump_stack+0x4d/0x63
      [   39.402123]  [<ffffffff9dca62b7>] spin_dump+0x97/0x9c
      [   39.402130]  [<ffffffff9dca62e7>] spin_bug+0x2b/0x2d
      [   39.402138]  [<ffffffff9dca6373>] do_raw_spin_lock+0x28/0xfd
      [   39.402147]  [<ffffffff9e3055cd>] _raw_spin_lock_irqsave+0x19/0x1f
      [   39.402154]  [<ffffffff9dca05b7>] complete+0x1d/0x48
      [   39.402162]  [<ffffffffc04f30af>] 0xffffffffc04f30af
      [   39.402167]  [<ffffffffc04f468c>] 0xffffffffc04f468c
      [   39.402177]  [<ffffffff9dd59c16>] ? __slab_free+0x22f/0x359
      [   39.402184]  [<ffffffff9dcc13e9>] ? tk_clock_read+0xc/0xe
      [   39.402189]  [<ffffffffc04f471f>] 0xffffffffc04f471f
      [   39.402195]  [<ffffffff9dc9ffe5>] ? __wake_up+0x44/0x4b
      [   39.402200]  [<ffffffffc04f3240>] ? 0xffffffffc04f3240
      [   39.402207]  [<ffffffff9e0f57f3>] erase_effect+0xa1/0xd2
      [   39.402214]  [<ffffffff9e0f58c6>] input_ff_flush+0x43/0x5c
      [   39.402219]  [<ffffffffc04f32ad>] 0xffffffffc04f32ad
      [   39.402227]  [<ffffffff9e0f174f>] input_flush_device+0x3d/0x51
      [   39.402234]  [<ffffffff9e0f69ae>] evdev_flush+0x49/0x5c
      [   39.402243]  [<ffffffff9dd62d6e>] filp_close+0x3f/0x65
      [   39.402253]  [<ffffffff9dd7dcf7>] put_files_struct+0x66/0xc1
      [   39.402261]  [<ffffffff9dd7ddeb>] exit_files+0x47/0x4e
      [   39.402270]  [<ffffffff9dc6b329>] do_exit+0x483/0x969
      [   39.402278]  [<ffffffff9dc73211>] ? recalc_sigpending_tsk+0x3d/0x44
      [   39.402285]  [<ffffffff9dc6c7a2>] do_group_exit+0x42/0xb0
      [   39.402293]  [<ffffffff9dc767e1>] get_signal+0x58d/0x5bf
      [   39.402300]  [<ffffffff9dc03701>] do_signal+0x37/0x53e
      [   39.402307]  [<ffffffff9e0f8401>] ? evdev_ioctl_handler+0xac8/0xb04
      [   39.402314]  [<ffffffff9e0f8464>] ? evdev_ioctl+0x10/0x12
      [   39.402321]  [<ffffffff9dd74cfa>] ? do_vfs_ioctl+0x42e/0x501
      [   39.402328]  [<ffffffff9dc0170e>] prepare_exit_to_usermode+0x66/0x90
      [   39.402333]  [<ffffffff9dc0181b>] syscall_return_slowpath+0xe3/0xec
      [   39.402339]  [<ffffffff9e305b7b>] int_ret_from_sys_call+0x25/0x8f
      
      While we could solve this by simply initializing the completion earlier, we
      are better off rearranging the code a bit so we avoid calling complete() on
      requests that we did not send out. This patch consolidates marking request
      slots as free in one place (in uinput_request_submit(), the same place
      where we acquire them) and having everyone else simply signal completion
      of the requests.
      
      Fixes: 00ce756c ("Input: uinput - mark failed submission requests as free")
      Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      6b4877c7
    • D
      Input: uinput - avoid FF flush when destroying device · e8b95728
      Dmitry Torokhov 提交于
      Normally, when input device supporting force feedback effects is being
      destroyed, we try to "flush" currently playing effects, so that the
      physical device does not continue vibrating (or executing other effects).
      Unfortunately this does not work well for uinput as flushing of the effects
      deadlocks with the destroy action:
      
      - if device is being destroyed because the file descriptor is being closed,
        then there is noone to even service FF requests;
      
      - if device is being destroyed because userspace sent UI_DEV_DESTROY,
        while theoretically it could be possible to service FF requests,
        userspace is unlikely to do so (they'd need to make sure FF handling
        happens on a separate thread) even if kernel solves the issue with FF
        ioctls deadlocking with UI_DEV_DESTROY ioctl on udev->mutex.
      
      To avoid lockups like the one below, let's install a custom input device
      flush handler, and avoid trying to flush force feedback effects when we
      destroying the device, and instead rely on uinput to shut off the device
      properly.
      
      NMI watchdog: Watchdog detected hard LOCKUP on cpu 3
      ...
       <<EOE>>  [<ffffffff817a0307>] _raw_spin_lock_irqsave+0x37/0x40
       [<ffffffff810e633d>] complete+0x1d/0x50
       [<ffffffffa00ba08c>] uinput_request_done+0x3c/0x40 [uinput]
       [<ffffffffa00ba587>] uinput_request_submit.part.7+0x47/0xb0 [uinput]
       [<ffffffffa00bb62b>] uinput_dev_erase_effect+0x5b/0x76 [uinput]
       [<ffffffff815d91ad>] erase_effect+0xad/0xf0
       [<ffffffff815d929d>] flush_effects+0x4d/0x90
       [<ffffffff815d4cc0>] input_flush_device+0x40/0x60
       [<ffffffff815daf1c>] evdev_cleanup+0xac/0xc0
       [<ffffffff815daf5b>] evdev_disconnect+0x2b/0x60
       [<ffffffff815d74ac>] __input_unregister_device+0xac/0x150
       [<ffffffff815d75f7>] input_unregister_device+0x47/0x70
       [<ffffffffa00bac45>] uinput_destroy_device+0xb5/0xc0 [uinput]
       [<ffffffffa00bb2de>] uinput_ioctl_handler.isra.9+0x65e/0x740 [uinput]
       [<ffffffff811231ab>] ? do_futex+0x12b/0xad0
       [<ffffffffa00bb3f8>] uinput_ioctl+0x18/0x20 [uinput]
       [<ffffffff81241248>] do_vfs_ioctl+0x298/0x480
       [<ffffffff81337553>] ? security_file_ioctl+0x43/0x60
       [<ffffffff812414a9>] SyS_ioctl+0x79/0x90
       [<ffffffff817a04ee>] entry_SYSCALL_64_fastpath+0x12/0x71
      Reported-by: NRodrigo Rivas Costa <rodrigorivascosta@gmail.com>
      Reported-by: NClément VUCHENER <clement.vuchener@gmail.com>
      Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=193741Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      e8b95728
    • T
      net: stmmac: Cocci spatch "of_table" · f0ef1f4f
      Thomas Meyer 提交于
      Make sure (of/i2c/platform)_device_id tables are NULL terminated.
      Found by coccinelle spatch "misc/of_table.cocci"
      Signed-off-by: NThomas Meyer <thomas@m3y3r.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f0ef1f4f
    • N
      lan78xx: Use default values loaded from EEPROM/OTP after reset · e3652805
      Nisar Sayed 提交于
      Use default value of auto duplex and auto speed values loaded
      from EEPROM/OTP after reset. The LAN78xx allows platform
      configurations to be loaded from EEPROM/OTP.
      Ex: When external phy is connected, the MAC can be configured to
      have correct auto speed, auto duplex, auto polarity configured
      from the EEPROM/OTP.
      
      Fixes: 55d7de9d ("Microchip's LAN7800 family USB 2/3 to 10/100/1000 Ethernet device driver")
      Signed-off-by: NNisar Sayed <Nisar.Sayed@microchip.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e3652805
    • N
      lan78xx: Allow EEPROM write for less than MAX_EEPROM_SIZE · c0776822
      Nisar Sayed 提交于
      Allow EEPROM write for less than MAX_EEPROM_SIZE
      
      Fixes: 55d7de9d ("Microchip's LAN7800 family USB 2/3 to 10/100/1000 Ethernet device driver")
      Signed-off-by: NNisar Sayed <Nisar.Sayed@microchip.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c0776822
    • N
      lan78xx: Fix for eeprom read/write when device auto suspend · 8a7ffeb7
      Nisar Sayed 提交于
      Fix for eeprom read/write when device auto suspend
      
      Fixes: 55d7de9d ("Microchip's LAN7800 family USB 2/3 to 10/100/1000 Ethernet device driver")
      Signed-off-by: NNisar Sayed <Nisar.Sayed@microchip.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8a7ffeb7
    • F
      net: phy: Keep reporting transceiver type · ceb62813
      Florian Fainelli 提交于
      With commit 2d55173e ("phy: add generic function to support
      ksetting support"), we lost the ability to report the transceiver type
      like we used to. Now that we have added back the transceiver type to
      ethtool_link_settings, we can report it back like we used to and have no
      loss of information.
      
      Fixes: 3f1ac7a7 ("net: ethtool: add new ETHTOOL_xLINKSETTINGS API")
      Fixes: 2d55173e ("phy: add generic function to support ksetting support")
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ceb62813
    • T
      net: qcom/emac: add software control for pause frame mode · 4a7a3860
      Timur Tabi 提交于
      The EMAC has the option of sending only a single pause frame when
      flow control is enabled and the RX queue is full.  Although sending
      only one pause frame has little value, this would allow admins to
      enable automatic flow control without having to worry about the EMAC
      flooding nearby switches with pause frames if the kernel hangs.
      
      The option is enabled by using the single-pause-mode private flag.
      Signed-off-by: NTimur Tabi <timur@codeaurora.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4a7a3860
    • A
      hv_netvsc: fix send buffer failure on MTU change · 0ab09bef
      Alex Ng 提交于
      If MTU is changed the host would reject the send buffer change.
      This problem is result of recent change to allow changing send
      buffer size.
      
      Every time we change the MTU, we store the previous net_device section
      count before destroying the buffer, but we don’t store the previous
      section size. When we reinitialize the buffer, its size is calculated
      by multiplying the previous count and previous size. Since we
      continuously increase the MTU, the host returns us a decreasing count
      value while the section size is reinitialized to 1728 bytes every
      time.
      
      This eventually leads to a condition where the calculated buf_size is
      so small that the host rejects it.
      
      Fixes: 8b532797 ("netvsc: allow controlling send/recv buffer size")
      Signed-off-by: NAlex Ng <alexng@microsoft.com>
      Signed-off-by: NStephen Hemminger <sthemmin@microsoft.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0ab09bef
  4. 21 9月, 2017 1 次提交