1. 02 11月, 2018 3 次提交
    • J
      nvme-fc: fix request private initialization · d19b8bc8
      James Smart 提交于
      The patch made to avoid Coverity reporting of out of bounds access
      on aen_op moved the assignment of a pointer, leaving it null when it
      was subsequently used to calculate a private pointer. Thus the private
      pointer was bad.
      
      Move/correct the private pointer initialization to be in sync with the
      patch.
      
      Fixes: 0d2bdf9f ("nvme-fc: rework the request initialization code")
      Signed-off-by: NJames Smart <jsmart2021@gmail.com>
      Reviewed-by: NSagi Grimberg <sagi@grimberg.me>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      d19b8bc8
    • D
      blkcg: revert blkcg cleanups series · b5f2954d
      Dennis Zhou 提交于
      This reverts a series committed earlier due to null pointer exception
      bug report in [1]. It seems there are edge case interactions that I did
      not consider and will need some time to understand what causes the
      adverse interactions.
      
      The original series can be found in [2] with a follow up series in [3].
      
      [1] https://www.spinics.net/lists/cgroups/msg20719.html
      [2] https://lore.kernel.org/lkml/20180911184137.35897-1-dennisszhou@gmail.com/
      [3] https://lore.kernel.org/lkml/20181020185612.51587-1-dennis@kernel.org/
      
      This reverts the following commits:
      d459d853, b2c3fa54, 101246ec, b3b9f24f, e2b09899,
      f0fcb3ec, c839e7a0, bdc24917, 74b7c02a, 5bf9a1f3,
      a7b39b4e, 07b05bcc, 49f4c2dc, 27e6fa99Signed-off-by: NDennis Zhou <dennis@kernel.org>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      b5f2954d
    • M
      block: brd: associate with queue until adding disk · 153fcd5f
      Ming Lei 提交于
      brd_free() may be called in failure path on one brd instance which
      disk isn't added yet, so release handler of gendisk may free the
      associated request_queue early and causes the following use-after-free[1].
      
      This patch fixes this issue by associating gendisk with request_queue
      just before adding disk.
      
      [1] KASAN: use-after-free Read in del_timer_syncNon-volatile memory driver v1.3
      Linux agpgart interface v0.103
      [drm] Initialized vgem 1.0.0 20120112 for virtual device on minor 0
      usbcore: registered new interface driver udl
      ==================================================================
      BUG: KASAN: use-after-free in __lock_acquire+0x36d9/0x4c20
      kernel/locking/lockdep.c:3218
      Read of size 8 at addr ffff8801d1b6b540 by task swapper/0/1
      
      CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.19.0+ #88
      Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
      Google 01/01/2011
      Call Trace:
        __dump_stack lib/dump_stack.c:77 [inline]
        dump_stack+0x244/0x39d lib/dump_stack.c:113
        print_address_description.cold.7+0x9/0x1ff mm/kasan/report.c:256
        kasan_report_error mm/kasan/report.c:354 [inline]
        kasan_report.cold.8+0x242/0x309 mm/kasan/report.c:412
        __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433
        __lock_acquire+0x36d9/0x4c20 kernel/locking/lockdep.c:3218
        lock_acquire+0x1ed/0x520 kernel/locking/lockdep.c:3844
        del_timer_sync+0xb7/0x270 kernel/time/timer.c:1283
        blk_cleanup_queue+0x413/0x710 block/blk-core.c:809
        brd_free+0x5d/0x71 drivers/block/brd.c:422
        brd_init+0x2eb/0x393 drivers/block/brd.c:518
        do_one_initcall+0x145/0x957 init/main.c:890
        do_initcall_level init/main.c:958 [inline]
        do_initcalls init/main.c:966 [inline]
        do_basic_setup init/main.c:984 [inline]
        kernel_init_freeable+0x5c6/0x6b9 init/main.c:1148
        kernel_init+0x11/0x1ae init/main.c:1068
        ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:350
      
      Reported-by: syzbot+3701447012fe951dabb2@syzkaller.appspotmail.com
      Signed-off-by: NMing Lei <ming.lei@redhat.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      153fcd5f
  2. 31 10月, 2018 1 次提交
  3. 26 10月, 2018 11 次提交
  4. 24 10月, 2018 6 次提交
    • L
      net/kconfig: Make QCOM_QMI_HELPERS available when COMPILE_TEST · a978a5b8
      Linus Torvalds 提交于
      The networking merge brought in the experimental support for the
      Qualcomm ath10k system NOC, which selects QCOM_QMI_HELPERS as a
      dependency.
      
      But the ATH10K_SNOC option (which selects QCOM_QMI_HELPERS) depends on
      ARCH_QCOM || COMPILE_TEST in order to get wider build testing than just
      the unusual QCOM architecture build, while the QCOM_QMI_HELPERS option
      doesn't have that COMPILE_TEST option and is limited to only ARCH_QCOM.
      
      As a result, a "make allmodconfig" complains
      
        WARNING: unmet direct dependencies detected for QCOM_QMI_HELPERS
          Depends on [n]: ARCH_QCOM && NET [=y]
          Selected by [m]:
          - ATH10K_SNOC [=m] && NETDEVICES [=y] && WLAN [=y] && WLAN_VENDOR_ATH [=y] && ATH10K [=m] && (ARCH_QCOM || COMPILE_TEST [=y])
      
      Fix the config-time warning by making QCOM_QMI_HELPERS available when
      COMPILE_TEST, since the result seems to build fine.
      
      Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
      Cc: Govind Singh <govinds@codeaurora.org>
      Cc: Kalle Valo <kvalo@codeaurora.org>
      Cc: David Miller <davem@davemloft.net>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a978a5b8
    • R
      qed: Fix static checker warning · 68203a67
      Rahul Verma 提交于
      	Static Checker Warnings:
      	drivers/net/ethernet/qlogic/qed/qed_main.c:1510 qed_fill_link_capability()
      	error: uninitialized symbol 'tcvr_state'.
      	drivers/net/ethernet/qlogic/qed/qed_mcp.c:1951 qed_mcp_trans_speed_mask()
      	error: uninitialized symbol 'transceiver_state'.
      	drivers/net/ethernet/qlogic/qed/qed_mcp.c:1951 qed_mcp_trans_speed_mask()
      	error: uninitialized symbol 'transceiver_type'.
      
      	Symbols tcvr_state, transceiver_state and transceiver_type
      	are initialized with respective default state.
      
      Fixes: c56a8be7 ("qed: Add supported link and advertise link to display in ethtool.")
      Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NRahul Verma <Rahul.Verma@cavium.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      68203a67
    • I
      Revert "be2net: remove desc field from be_eq_obj" · 5ef79151
      Ivan Vecera 提交于
      The mentioned commit needs to be reverted because we cannot pass
      string allocated on stack to request_irq(). This function stores
      uses this pointer for later use (e.g. /proc/interrupts) so we need
      to keep this string persistently.
      
      Fixes: d6d9704a ("be2net: remove desc field from be_eq_obj")
      Signed-off-by: NIvan Vecera <ivecera@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5ef79151
    • M
      net: socionext: Reset tx queue in ndo_stop · 8d5b0bf6
      Masahisa Kojima 提交于
      We observed that packets and bytes count are not reset
      when user performs interface down. Eventually, tx queue is
      exhausted and packets will not be sent out.
      To avoid this problem, resets tx queue in ndo_stop.
      
      Fixes: 533dd11a ("net: socionext: Add Synquacer NetSec driver")
      Signed-off-by: NMasahisa Kojima <masahisa.kojima@linaro.org>
      Signed-off-by: NYoshitoyo Osaki <osaki.yoshitoyo@socionext.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8d5b0bf6
    • M
      net: socionext: Add dummy PHY register read in phy_write() · a3241a91
      Masahisa Kojima 提交于
      There is a compatibility issue between RTL8211E implemented
      in Developerbox and netsec ethernet controller IP.
      
      Our MDIO controller stops MDC clock right after the write
      access, but RTL8211E expects MDC clock must be kept toggling
      for several clock cycle with MDIO high before entering
      the IDLE state. Without keeping clock after write access,
      write access is not correctly handled and register is not
      updated.
      
      To meet this requirement, netsec driver needs to issue dummy
      read(e.g. read PHYID1(offset 0x2) register) right after write
      access, to keep MDC clock.
      
      We think this compatibility issue is a problem specific to
      our MDIO controller and RTL8211E.
      
      Fixes: 533dd11a ("net: socionext: Add Synquacer NetSec driver")
      Signed-off-by: NMasahisa Kojima <masahisa.kojima@linaro.org>
      Signed-off-by: NYoshitoyo Osaki <osaki.yoshitoyo@socionext.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a3241a91
    • M
      net: socionext: Stop PHY before resetting netsec · 8e850f25
      Masahisa Kojima 提交于
      In ndo_stop, driver resets the netsec ethernet controller IP.
      When the netsec IP is reset, HW running mode turns to NRM mode
      and driver has to wait until this mode transition completes.
      
      But mode transition to NRM will not complete if the PHY is
      in normal operation state. Netsec IP requires PHY is in
      power down state when it is reset.
      
      This modification stops the PHY before resetting netsec.
      
      Together with this modification, phy_addr is stored in netsec_priv
      structure because ndev->phydev is not yet ready in ndo_init.
      
      Fixes: 533dd11a ("net: socionext: Add Synquacer NetSec driver")
      Signed-off-by: NMasahisa Kojima <masahisa.kojima@linaro.org>
      Signed-off-by: NYoshitoyo Osaki <osaki.yoshitoyo@socionext.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8e850f25
  5. 23 10月, 2018 19 次提交