1. 18 10月, 2018 6 次提交
  2. 16 10月, 2018 7 次提交
  3. 12 10月, 2018 7 次提交
  4. 11 10月, 2018 7 次提交
    • G
      qmi_wwan: Added support for Gemalto's Cinterion ALASxx WWAN interface · 4f761770
      Giacinto Cifelli 提交于
      Added support for Gemalto's Cinterion ALASxx WWAN interfaces
      by adding QMI_FIXED_INTF with Cinterion's VID and PID.
      Signed-off-by: NGiacinto Cifelli <gciofono@gmail.com>
      Acked-by: NBjørn Mork <bjorn@mork.no>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4f761770
    • D
      dm linear: fix linear_end_io conditional definition · 118aa47c
      Damien Le Moal 提交于
      The dm-linear target is independent of the dm-zoned target. For code
      requiring support for zoned block devices, use CONFIG_BLK_DEV_ZONED
      instead of CONFIG_DM_ZONED.
      
      While at it, similarly to dm linear, also enable the DM_TARGET_ZONED_HM
      feature in dm-flakey only if CONFIG_BLK_DEV_ZONED is defined.
      
      Fixes: beb9caac ("dm linear: eliminate linear_end_io call if CONFIG_DM_ZONED disabled")
      Fixes: 0be12c1c ("dm linear: add support for zoned block devices")
      Cc: stable@vger.kernel.org
      Signed-off-by: NDamien Le Moal <damien.lemoal@wdc.com>
      Signed-off-by: NMike Snitzer <snitzer@redhat.com>
      118aa47c
    • T
      net/mlx5: WQ, fixes for fragmented WQ buffers API · 37fdffb2
      Tariq Toukan 提交于
      mlx5e netdevice used to calculate fragment edges by a call to
      mlx5_wq_cyc_get_frag_size(). This calculation did not give the correct
      indication for queues smaller than a PAGE_SIZE, (broken by default on
      PowerPC, where PAGE_SIZE == 64KB).  Here it is replaced by the correct new
      calls/API.
      
      Since (TX/RX) Work Queues buffers are fragmented, here we introduce
      changes to the API in core driver, so that it gets a stride index and
      returns the index of last stride on same fragment, and an additional
      wrapping function that returns the number of physically contiguous
      strides that can be written contiguously to the work queue.
      
      This obsoletes the following API functions, and their buggy
      usage in EN driver:
      * mlx5_wq_cyc_get_frag_size()
      * mlx5_wq_cyc_ctr2fragix()
      
      The new API improves modularity and hides the details of such
      calculation for mlx5e netdevice and mlx5_ib rdma drivers.
      
      New calculation is also more efficient, and improves performance
      as follows:
      
      Packet rate test: pktgen, UDP / IPv4, 64byte, single ring, 8K ring size.
      
      Before: 16,477,619 pps
      After:  17,085,793 pps
      
      3.7% improvement
      
      Fixes: 3a2f7033 ("net/mlx5: Use order-0 allocations for all WQ types")
      Signed-off-by: NTariq Toukan <tariqt@mellanox.com>
      Reviewed-by: NEran Ben Elisha <eranbe@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      37fdffb2
    • H
      net/mlx5: Take only bit 24-26 of wqe.pftype_wq for page fault type · a48bc513
      Huy Nguyen 提交于
      The HW spec defines only bits 24-26 of pftype_wq as the page fault type,
      use the required mask to ensure that.
      
      Fixes: d9aaed83 ("{net,IB}/mlx5: Refactor page fault handling")
      Signed-off-by: NHuy Nguyen <huyn@mellanox.com>
      Signed-off-by: NEli Cohen <eli@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      a48bc513
    • T
      net/mlx5: Fix memory leak when setting fpga ipsec caps · fd7e8480
      Talat Batheesh 提交于
      Allocated memory for context should be freed once
      finished working with it.
      
      Fixes: d6c4f029 ("net/mlx5: Refactor accel IPSec code")
      Signed-off-by: NTalat Batheesh <talatb@mellanox.com>
      Reviewed-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Reviewed-by: NTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      fd7e8480
    • V
      IB/mlx5: Unmap DMA addr from HCA before IOMMU · dd9a4034
      Valentine Fatiev 提交于
      The function that puts back the MR in cache also removes the DMA address
      from the HCA. Therefore we need to call this function before we remove
      the DMA mapping from MMU. Otherwise the HCA may access a memory that
      is no longer DMA mapped.
      
      Call trace:
      NMI: IOCK error (debug interrupt?) for reason 71 on CPU 0.
      CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.19.0-rc6+ #4
      Hardware name: HP ProLiant DL360p Gen8, BIOS P71 08/20/2012
      RIP: 0010:intel_idle+0x73/0x120
      Code: 80 5c 01 00 0f ae 38 0f ae f0 31 d2 65 48 8b 04 25 80 5c 01 00 48 89 d1 0f 60 02
      RSP: 0018:ffffffff9a403e38 EFLAGS: 00000046
      RAX: 0000000000000030 RBX: 0000000000000005 RCX: 0000000000000001
      RDX: 0000000000000000 RSI: ffffffff9a5790c0 RDI: 0000000000000000
      RBP: 0000000000000030 R08: 0000000000000000 R09: 0000000000007cf9
      R10: 000000000000030a R11: 0000000000000018 R12: 0000000000000000
      R13: ffffffff9a5792b8 R14: ffffffff9a5790c0 R15: 0000002b48471e4d
      FS:  0000000000000000(0000) GS:ffff9c6caf400000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 00007f5737185000 CR3: 0000000590c0a002 CR4: 00000000000606f0
      Call Trace:
       cpuidle_enter_state+0x7e/0x2e0
       do_idle+0x1ed/0x290
       cpu_startup_entry+0x6f/0x80
       start_kernel+0x524/0x544
       ? set_init_arg+0x55/0x55
       secondary_startup_64+0xa4/0xb0
      DMAR: DRHD: handling fault status reg 2
      DMAR: [DMA Read] Request device [04:00.0] fault addr b34d2000 [fault reason 06] PTE Read access is not set
      DMAR: [DMA Read] Request device [01:00.2] fault addr bff8b000 [fault reason 06] PTE Read access is not set
      
      Fixes: f3f134f5 ("RDMA/mlx5: Fix crash while accessing garbage pointer and freed memory")
      Signed-off-by: NValentine Fatiev <valentinef@mellanox.com>
      Reviewed-by: NMoni Shoua <monis@mellanox.com>
      Signed-off-by: NLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      dd9a4034
    • M
      dm linear: eliminate linear_end_io call if CONFIG_DM_ZONED disabled · beb9caac
      Mike Snitzer 提交于
      It is best to avoid any extra overhead associated with bio completion.
      DM core will indirectly call a DM target's .end_io if it is defined.
      In the case of DM linear, there is no need to do so (for every bio that
      completes) if CONFIG_DM_ZONED is not enabled.
      
      Avoiding an extra indirect call for every bio completion is very
      important for ensuring DM linear doesn't incur more overhead that
      further widens the performance gap between dm-linear and raw block
      devices.
      
      Fixes: 0be12c1c ("dm linear: add support for zoned block devices")
      Cc: stable@vger.kernel.org
      Signed-off-by: NMike Snitzer <snitzer@redhat.com>
      beb9caac
  5. 10 10月, 2018 11 次提交
    • M
      pinctrl: mcp23s08: fix irq and irqchip setup order · f259f896
      Marco Felsch 提交于
      Since 'commit 02e389e6 ("pinctrl: mcp23s08: fix irq setup order")' the
      irq request isn't the last devm_* allocation. Without a deeper look at
      the irq and testing this isn't a good solution. Since this driver relies
      on the devm mechanism, requesting a interrupt should be the last thing
      to avoid memory corruptions during unbinding.
      
      'Commit 02e389e6 ("pinctrl: mcp23s08: fix irq setup order")' fixed the
      order for the interrupt-controller use case only. The
      mcp23s08_irq_setup() must be split into two to fix it for the
      interrupt-controller use case and to register the irq at last. So the
      irq will be freed first during unbind.
      
      Cc: stable@vger.kernel.org
      Cc: Jan Kundrát <jan.kundrat@cesnet.cz>
      Cc: Dmitry Mastykin <mastichi@gmail.com>
      Cc: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
      Fixes: 82039d24 ("pinctrl: mcp23s08: add pinconf support")
      Fixes: 02e389e6 ("pinctrl: mcp23s08: fix irq setup order")
      Signed-off-by: NMarco Felsch <m.felsch@pengutronix.de>
      Tested-by: NPhil Reid <preid@electromag.com.au>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      f259f896
    • S
      gpio: Assign gpio_irq_chip::parents to non-stack pointer · 3e779a2e
      Stephen Boyd 提交于
      gpiochip_set_cascaded_irqchip() is passed 'parent_irq' as an argument
      and then the address of that argument is assigned to the gpio chips
      gpio_irq_chip 'parents' pointer shortly thereafter. This can't ever
      work, because we've just assigned some stack address to a pointer that
      we plan to dereference later in gpiochip_irq_map(). I ran into this
      issue with the KASAN report below when gpiochip_irq_map() tried to setup
      the parent irq with a total junk pointer for the 'parents' array.
      
      BUG: KASAN: stack-out-of-bounds in gpiochip_irq_map+0x228/0x248
      Read of size 4 at addr ffffffc0dde472e0 by task swapper/0/1
      
      CPU: 7 PID: 1 Comm: swapper/0 Not tainted 4.14.72 #34
      Call trace:
      [<ffffff9008093638>] dump_backtrace+0x0/0x718
      [<ffffff9008093da4>] show_stack+0x20/0x2c
      [<ffffff90096b9224>] __dump_stack+0x20/0x28
      [<ffffff90096b91c8>] dump_stack+0x80/0xbc
      [<ffffff900845a350>] print_address_description+0x70/0x238
      [<ffffff900845a8e4>] kasan_report+0x1cc/0x260
      [<ffffff900845aa14>] __asan_report_load4_noabort+0x2c/0x38
      [<ffffff900897e098>] gpiochip_irq_map+0x228/0x248
      [<ffffff900820cc08>] irq_domain_associate+0x114/0x2ec
      [<ffffff900820d13c>] irq_create_mapping+0x120/0x234
      [<ffffff900820da78>] irq_create_fwspec_mapping+0x4c8/0x88c
      [<ffffff900820e2d8>] irq_create_of_mapping+0x180/0x210
      [<ffffff900917114c>] of_irq_get+0x138/0x198
      [<ffffff9008dc70ac>] spi_drv_probe+0x94/0x178
      [<ffffff9008ca5168>] driver_probe_device+0x51c/0x824
      [<ffffff9008ca6538>] __device_attach_driver+0x148/0x20c
      [<ffffff9008ca14cc>] bus_for_each_drv+0x120/0x188
      [<ffffff9008ca570c>] __device_attach+0x19c/0x2dc
      [<ffffff9008ca586c>] device_initial_probe+0x20/0x2c
      [<ffffff9008ca18bc>] bus_probe_device+0x80/0x154
      [<ffffff9008c9b9b4>] device_add+0x9b8/0xbdc
      [<ffffff9008dc7640>] spi_add_device+0x1b8/0x380
      [<ffffff9008dcbaf0>] spi_register_controller+0x111c/0x1378
      [<ffffff9008dd6b10>] spi_geni_probe+0x4dc/0x6f8
      [<ffffff9008cab058>] platform_drv_probe+0xdc/0x130
      [<ffffff9008ca5168>] driver_probe_device+0x51c/0x824
      [<ffffff9008ca59cc>] __driver_attach+0x100/0x194
      [<ffffff9008ca0ea8>] bus_for_each_dev+0x104/0x16c
      [<ffffff9008ca58c0>] driver_attach+0x48/0x54
      [<ffffff9008ca1edc>] bus_add_driver+0x274/0x498
      [<ffffff9008ca8448>] driver_register+0x1ac/0x230
      [<ffffff9008caaf6c>] __platform_driver_register+0xcc/0xdc
      [<ffffff9009c4b33c>] spi_geni_driver_init+0x1c/0x24
      [<ffffff9008084cb8>] do_one_initcall+0x240/0x3dc
      [<ffffff9009c017d0>] kernel_init_freeable+0x378/0x468
      [<ffffff90096e8240>] kernel_init+0x14/0x110
      [<ffffff9008086fcc>] ret_from_fork+0x10/0x18
      
      The buggy address belongs to the page:
      page:ffffffbf037791c0 count:0 mapcount:0 mapping:          (null) index:0x0
      flags: 0x4000000000000000()
      raw: 4000000000000000 0000000000000000 0000000000000000 00000000ffffffff
      raw: ffffffbf037791e0 ffffffbf037791e0 0000000000000000 0000000000000000
      page dumped because: kasan: bad access detected
      
      Memory state around the buggy address:
       ffffffc0dde47180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
       ffffffc0dde47200: f1 f1 f1 f1 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f2 f2
      >ffffffc0dde47280: f2 f2 00 00 00 00 00 00 00 00 00 00 f3 f3 f3 f3
                                                             ^
       ffffffc0dde47300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
       ffffffc0dde47380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
      
      Let's leave around one unsigned int in the gpio_irq_chip struct for the
      single parent irq case and repoint the 'parents' array at it. This way
      code is left mostly intact to setup parents and we waste an extra few
      bytes per structure of which there should be only a handful in a system.
      
      Cc: Evan Green <evgreen@chromium.org>
      Cc: Thierry Reding <treding@nvidia.com>
      Cc: Grygorii Strashko <grygorii.strashko@ti.com>
      Fixes: e0d89728 ("gpio: Implement tighter IRQ chip integration")
      Signed-off-by: NStephen Boyd <swboyd@chromium.org>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      3e779a2e
    • D
      libertas: call into generic suspend code before turning off power · 4f666675
      Daniel Mack 提交于
      When powering down a SDIO connected card during suspend, make sure to call
      into the generic lbs_suspend() function before pulling the plug. This will
      make sure the card is successfully deregistered from the system to avoid
      communication to the card starving out.
      
      Fixes: 7444a809 ("libertas: fix suspend and resume for SDIO connected cards")
      Signed-off-by: NDaniel Mack <daniel@zonque.org>
      Reviewed-by: NUlf Hansson <ulf.hansson@linaro.org>
      Acked-by: NKalle Valo <kvalo@codeaurora.org>
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      4f666675
    • G
      of: unittest: Disable interrupt node tests for old world MAC systems · 88948914
      Guenter Roeck 提交于
      On systems with OF_IMAP_OLDWORLD_MAC set in of_irq_workarounds, the
      devicetree interrupt parsing code is different, causing unit tests of
      devicetree interrupt nodes to fail. Due to a bug in unittest code, which
      tries to dereference an uninitialized pointer, this results in a crash.
      
      OF: /testcase-data/phandle-tests/consumer-a: arguments longer than property
      Unable to handle kernel paging request for data at address 0x00bc616e
      Faulting instruction address: 0xc08e9468
      Oops: Kernel access of bad area, sig: 11 [#1]
      BE PREEMPT PowerMac
      Modules linked in:
      CPU: 0 PID: 1 Comm: swapper Not tainted 4.14.72-rc1-yocto-standard+ #1
      task: cf8e0000 task.stack: cf8da000
      NIP:  c08e9468 LR: c08ea5bc CTR: c08ea5ac
      REGS: cf8dbb50 TRAP: 0300   Not tainted  (4.14.72-rc1-yocto-standard+)
      MSR:  00001032 <ME,IR,DR,RI>  CR: 82004044  XER: 00000000
      DAR: 00bc616e DSISR: 40000000
      GPR00: c08ea5bc cf8dbc00 cf8e0000 c13ca517 c13ca517 c13ca8a0 00000066 00000002
      GPR08: 00000063 00bc614e c0b05865 000affff 82004048 00000000 c00047f0 00000000
      GPR16: c0a80000 c0a9cc34 c13ca517 c0ad1134 05ffffff 000affff c0b05860 c0abeef8
      GPR24: cecec278 cecec278 c0a8c4d0 c0a885e0 c13ca8a0 05ffffff c13ca8a0 c13ca517
      
      NIP [c08e9468] device_node_gen_full_name+0x30/0x15c
      LR [c08ea5bc] device_node_string+0x190/0x3c8
      Call Trace:
      [cf8dbc00] [c007f670] trace_hardirqs_on_caller+0x118/0x1fc (unreliable)
      [cf8dbc40] [c08ea5bc] device_node_string+0x190/0x3c8
      [cf8dbcb0] [c08eb794] pointer+0x25c/0x4d0
      [cf8dbd00] [c08ebcbc] vsnprintf+0x2b4/0x5ec
      [cf8dbd60] [c08ec00c] vscnprintf+0x18/0x48
      [cf8dbd70] [c008e268] vprintk_store+0x4c/0x22c
      [cf8dbda0] [c008ecac] vprintk_emit+0x94/0x130
      [cf8dbdd0] [c008ff54] printk+0x5c/0x6c
      [cf8dbe10] [c0b8ddd4] of_unittest+0x2220/0x26f8
      [cf8dbea0] [c0004434] do_one_initcall+0x4c/0x184
      [cf8dbf00] [c0b4534c] kernel_init_freeable+0x13c/0x1d8
      [cf8dbf30] [c0004814] kernel_init+0x24/0x118
      [cf8dbf40] [c0013398] ret_from_kernel_thread+0x5c/0x64
      
      The problem was observed when running a qemu test for the g3beige machine
      with devicetree unittests enabled.
      
      Disable interrupt node tests on affected systems to avoid both false
      unittest failures and the crash.
      
      With this patch in place, unittest on the affected system passes with
      the following message.
      
      	dt-test ### end of unittest - 144 passed, 0 failed
      
      Fixes: 53a42093 ("of: Add device tree selftests")
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      Reviewed-by: NFrank Rowand <frank.rowand@sony.com>
      Signed-off-by: NRob Herring <robh@kernel.org>
      88948914
    • E
      mfd: cros-ec: copy the whole event in get_next_event_xfer · d4d2313a
      Emil Karlson 提交于
      Commit 57e94c8b caused cros-ec keyboard events
      be truncated on many chromebooks so that Left and Right keys on Column 12 were
      always 0. Use ret as memcpy len to fix this.
      
      The old code was using ec_dev->event_size, which is the event payload/data size
      excluding event_type header, for the length of the memcpy operation. Use ret
      as memcpy length to avoid the off by one and copy the whole msg->data.
      
      Fixes: 57e94c8b ("mfd: cros-ec: Increase maximum mkbp event size")
      Acked-by: NEnric Balletbo i Serra <enric.balletbo@collabora.com>
      Tested-by: NEmil Renner Berthing <kernel@esmil.dk>
      Signed-off-by: NEmil Karlson <jekarlson@gmail.com>
      Signed-off-by: NBenson Leung <bleung@chromium.org>
      d4d2313a
    • D
      dm: fix report zone remapping to account for partition offset · 9864cd5d
      Damien Le Moal 提交于
      If dm-linear or dm-flakey are layered on top of a partition of a zoned
      block device, remapping of the start sector and write pointer position
      of the zones reported by a report zones BIO must be modified to account
      for the target table entry mapping (start offset within the device and
      entry mapping with the dm device).  If the target's backing device is a
      partition of a whole disk, the start sector on the physical device of
      the partition must also be accounted for when modifying the zone
      information.  However, dm_remap_zone_report() was not considering this
      last case, resulting in incorrect zone information remapping with
      targets using disk partitions.
      
      Fix this by calculating the target backing device start sector using
      the position of the completed report zones BIO and the unchanged
      position and size of the original report zone BIO. With this value
      calculated, the start sector and write pointer position of the target
      zones can be correctly remapped.
      
      Fixes: 10999307 ("dm: introduce dm_remap_zone_report()")
      Cc: stable@vger.kernel.org
      Signed-off-by: NDamien Le Moal <damien.lemoal@wdc.com>
      Signed-off-by: NMike Snitzer <snitzer@redhat.com>
      9864cd5d
    • S
      dm cache: destroy migration_cache if cache target registration failed · c7cd5550
      Shenghui Wang 提交于
      Commit 7e6358d2 ("dm: fix various targets to dm_register_target
      after module __init resources created") inadvertently introduced this
      bug when it moved dm_register_target() after the call to KMEM_CACHE().
      
      Fixes: 7e6358d2 ("dm: fix various targets to dm_register_target after module __init resources created")
      Cc: stable@vger.kernel.org
      Signed-off-by: NShenghui Wang <shhuiw@foxmail.com>
      Signed-off-by: NMike Snitzer <snitzer@redhat.com>
      c7cd5550
    • A
      net: ena: fix auto casting to boolean · 248ab773
      Arthur Kiyanovski 提交于
      Eliminate potential auto casting compilation error.
      
      Fixes: 1738cd3e ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)")
      Signed-off-by: NArthur Kiyanovski <akiyano@amazon.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      248ab773
    • A
      net: ena: fix NULL dereference due to untimely napi initialization · 78a55d05
      Arthur Kiyanovski 提交于
      napi poll functions should be initialized before running request_irq(),
      to handle a rare condition where there is a pending interrupt, causing
      the ISR to fire immediately while the poll function wasn't set yet,
      causing a NULL dereference.
      
      Fixes: 1738cd3e ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)")
      Signed-off-by: NArthur Kiyanovski <akiyano@amazon.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      78a55d05
    • A
      net: ena: fix rare bug when failed restart/resume is followed by driver removal · d7703ddb
      Arthur Kiyanovski 提交于
      In a rare scenario when ena_device_restore() fails, followed by device
      remove, an FLR will not be issued. In this case, the device will keep
      sending asynchronous AENQ keep-alive events, even after driver removal,
      leading to memory corruption.
      
      Fixes: 8c5c7abd ("net: ena: add power management ops to the ENA driver")
      Signed-off-by: NArthur Kiyanovski <akiyano@amazon.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d7703ddb
    • A
      net: ena: fix warning in rmmod caused by double iounmap · d79c3888
      Arthur Kiyanovski 提交于
      Memory mapped with devm_ioremap is automatically freed when the driver
      is disconnected from the device. Therefore there is no need to
      explicitly call devm_iounmap.
      
      Fixes: 0857d92f ("net: ena: add missing unmap bars on device removal")
      Fixes: 411838e7 ("net: ena: fix rare kernel crash when bar memory remap fails")
      Signed-off-by: NArthur Kiyanovski <akiyano@amazon.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d79c3888
  6. 09 10月, 2018 1 次提交
  7. 08 10月, 2018 1 次提交