1. 14 Aug, 2020 5 commits
    • Grzegorz Szczurek's avatar
      i40e: Fix crash during removing i40e driver · 5b6d4a7f
      Grzegorz Szczurek authored
      Fix the reason of crashing system by add waiting time to finish reset
      recovery process before starting remove driver procedure.
      Now VSI is releasing if VSI is not in reset recovery mode.
      Without this fix it was possible to start remove driver if other
      processing command need reset recovery procedure which resulted in
      null pointer dereference. VSI used by the ethtool process has been
      cleared by remove driver process.
      
      [ 6731.508665] BUG: kernel NULL pointer dereference, address: 0000000000000000
      [ 6731.508668] #PF: supervisor read access in kernel mode
      [ 6731.508670] #PF: error_code(0x0000) - not-present page
      [ 6731.508671] PGD 0 P4D 0
      [ 6731.508674] Oops: 0000 [#1] SMP PTI
      [ 6731.508679] Hardware name: Intel Corporation S2600WT2R/S2600WT2R, BIOS SE5C610.86B.01.01.0021.032120170601 03/21/2017
      [ 6731.508694] RIP: 0010:i40e_down+0x252/0x310 [i40e]
      [ 6731.508696] Code: c7 78 de fa c0 e8 61 02 3a c1 66 83 bb f6 0c 00 00 00 0f 84 bf 00 00 00 45 31 e4 45 31 ff eb 03 41 89 c7 48 8b 83 98 0c 00 00 <4a> 8b 3c 20 e8 a5 79 02 00 48 83 bb d0 0c 00 00 00 74 10 48 8b 83
      [ 6731.508698] RSP: 0018:ffffb75ac7b3faf0 EFLAGS: 00010246
      [ 6731.508700] RAX: 0000000000000000 RBX: ffff9c9874bd5000 RCX: 0000000000000007
      [ 6731.508701] RDX: 0000000000000000 RSI: 0000000000000096 RDI: ffff9c987f4d9780
      [ 6731.508703] RBP: ffffb75ac7b3fb30 R08: 0000000000005b60 R09: 0000000000000004
      [ 6731.508704] R10: ffffb75ac64fbd90 R11: 0000000000000001 R12: 0000000000000000
      [ 6731.508706] R13: ffff9c97a08e0000 R14: ffff9c97a08e0a68 R15: 0000000000000000
      [ 6731.508708] FS:  00007f2617cd2740(0000) GS:ffff9c987f4c0000(0000) knlGS:0000000000000000
      [ 6731.508710] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [ 6731.508711] CR2: 0000000000000000 CR3: 0000001e765c4006 CR4: 00000000003606e0
      [ 6731.508713] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      [ 6731.508714] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      [ 6731.508715] Call Trace:
      [ 6731.508734]  i40e_vsi_close+0x84/0x90 [i40e]
      [ 6731.508742]  i40e_quiesce_vsi.part.98+0x3c/0x40 [i40e]
      [ 6731.508749]  i40e_pf_quiesce_all_vsi+0x55/0x60 [i40e]
      [ 6731.508757]  i40e_prep_for_reset+0x59/0x130 [i40e]
      [ 6731.508765]  i40e_reconfig_rss_queues+0x5a/0x120 [i40e]
      [ 6731.508774]  i40e_set_channels+0xda/0x170 [i40e]
      [ 6731.508778]  ethtool_set_channels+0xe9/0x150
      [ 6731.508781]  dev_ethtool+0x1b94/0x2920
      [ 6731.508805]  dev_ioctl+0xc2/0x590
      [ 6731.508811]  sock_do_ioctl+0xae/0x150
      [ 6731.508813]  sock_ioctl+0x34f/0x3c0
      [ 6731.508821]  ksys_ioctl+0x98/0xb0
      [ 6731.508828]  __x64_sys_ioctl+0x1a/0x20
      [ 6731.508831]  do_syscall_64+0x57/0x1c0
      [ 6731.508835]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
      
      Fixes: 4b816446 ("i40e: Add common function for finding VSI by type")
      Signed-off-by: default avatarGrzegorz Szczurek <grzegorzx.szczurek@intel.com>
      Signed-off-by: default avatarArkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
      Tested-by: default avatarAaron Brown <aaron.f.brown@intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      5b6d4a7f
    • Przemyslaw Patynowski's avatar
      i40e: Set RX_ONLY mode for unicast promiscuous on VLAN · 4bd5e02a
      Przemyslaw Patynowski authored
      Trusted VF with unicast promiscuous mode set, could listen to TX
      traffic of other VFs.
      Set unicast promiscuous mode to RX traffic, if VSI has port VLAN
      configured. Rename misleading I40E_AQC_SET_VSI_PROMISC_TX bit to
      I40E_AQC_SET_VSI_PROMISC_RX_ONLY. Aligned unicast promiscuous with
      VLAN to the one without VLAN.
      
      Fixes: 6c41a760 ("i40e: Add promiscuous on VLAN support")
      Fixes: 3b120089 ("i40e: When in promisc mode apply promisc mode to Tx Traffic as well")
      Signed-off-by: default avatarPrzemyslaw Patynowski <przemyslawx.patynowski@intel.com>
      Signed-off-by: default avatarAleksandr Loktionov <aleksandr.loktionov@intel.com>
      Signed-off-by: default avatarArkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
      Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      4bd5e02a
    • Vinicius Costa Gomes's avatar
      igc: Fix PTP initialization · 3cda505a
      Vinicius Costa Gomes authored
      Right now, igc_ptp_reset() is called from igc_reset(), which is called
      from igc_probe() before igc_ptp_init() has a chance to run. It is
      detected as an attempt to use an spinlock without registering its key
      first. See log below.
      
      To avoid this problem, simplify the initialization: igc_ptp_init() is
      only called from igc_probe(), and igc_ptp_reset() is only called from
      igc_reset().
      
      [    2.736332] INFO: trying to register non-static key.
      [    2.736902] input: HDA Intel PCH Front Headphone as /devices/pci0000:00/0000:00:1f.3/sound/card0/input10
      [    2.737513] the code is fine but needs lockdep annotation.
      [    2.737513] turning off the locking correctness validator.
      [    2.737515] CPU: 8 PID: 239 Comm: systemd-udevd Tainted: G            E     5.8.0-rc7+ #13
      [    2.737515] Hardware name: Gigabyte Technology Co., Ltd. Z390 AORUS ULTRA/Z390 AORUS ULTRA-CF, BIOS F7 03/14/2019
      [    2.737516] Call Trace:
      [    2.737521]  dump_stack+0x78/0xa0
      [    2.737524]  register_lock_class+0x6b1/0x6f0
      [    2.737526]  ? lockdep_hardirqs_on_prepare+0xca/0x160
      [    2.739177]  ? _raw_spin_unlock_irq+0x24/0x50
      [    2.739179]  ? trace_hardirqs_on+0x1c/0xf0
      [    2.740820]  __lock_acquire+0x56/0x1ff0
      [    2.740823]  ? __schedule+0x30c/0x970
      [    2.740825]  lock_acquire+0x97/0x3e0
      [    2.740830]  ? igc_ptp_reset+0x35/0xf0 [igc]
      [    2.740833]  ? schedule_hrtimeout_range_clock+0xb7/0x120
      [    2.742507]  _raw_spin_lock_irqsave+0x3a/0x50
      [    2.742512]  ? igc_ptp_reset+0x35/0xf0 [igc]
      [    2.742515]  igc_ptp_reset+0x35/0xf0 [igc]
      [    2.742519]  igc_reset+0x96/0xd0 [igc]
      [    2.744148]  igc_probe+0x68f/0x7d0 [igc]
      [    2.745796]  local_pci_probe+0x3d/0x70
      [    2.745799]  pci_device_probe+0xd1/0x190
      [    2.745802]  really_probe+0x15a/0x3f0
      [    2.759936]  driver_probe_device+0xe1/0x150
      [    2.759937]  device_driver_attach+0xa8/0xb0
      [    2.761786]  __driver_attach+0x89/0x150
      [    2.761786]  ? device_driver_attach+0xb0/0xb0
      [    2.761787]  ? device_driver_attach+0xb0/0xb0
      [    2.761788]  bus_for_each_dev+0x66/0x90
      [    2.765012]  bus_add_driver+0x12e/0x1f0
      [    2.765716]  driver_register+0x8b/0xe0
      [    2.766418]  ? 0xffffffffc0230000
      [    2.767119]  do_one_initcall+0x5a/0x310
      [    2.767826]  ? kmem_cache_alloc_trace+0xe9/0x200
      [    2.768528]  do_init_module+0x5c/0x260
      [    2.769206]  __do_sys_finit_module+0x93/0xe0
      [    2.770048]  do_syscall_64+0x46/0xa0
      [    2.770716]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
      [    2.771396] RIP: 0033:0x7f83534589e0
      [    2.772073] Code: 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 2e 2e 2e 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 80 24 0d 00 f7 d8 64 89 01 48
      [    2.772074] RSP: 002b:00007ffd31d0ed18 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
      [    2.774854] RAX: ffffffffffffffda RBX: 000055d52816aba0 RCX: 00007f83534589e0
      [    2.774855] RDX: 0000000000000000 RSI: 00007f83535b982f RDI: 0000000000000006
      [    2.774855] RBP: 00007ffd31d0ed60 R08: 0000000000000000 R09: 00007ffd31d0ed30
      [    2.774856] R10: 0000000000000006 R11: 0000000000000246 R12: 0000000000000000
      [    2.774856] R13: 0000000000020000 R14: 00007f83535b982f R15: 000055d527f5e120
      
      Fixes: 5f295805 ("igc: Add basic skeleton for PTP")
      Signed-off-by: default avatarVinicius Costa Gomes <vinicius.gomes@intel.com>
      Reviewed-by: default avatarAndre Guedes <andre.guedes@intel.com>
      Tested-by: default avatarAaron Brown <aaron.f.brown@intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      3cda505a
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · a1d21081
      Linus Torvalds authored
      Pull networking fixes from David Miller:
       "Some merge window fallout, some longer term fixes:
      
         1) Handle headroom properly in lapbether and x25_asy drivers, from
            Xie He.
      
         2) Fetch MAC address from correct r8152 device node, from Thierry
            Reding.
      
         3) In the sw kTLS path we should allow MSG_CMSG_COMPAT in sendmsg,
            from Rouven Czerwinski.
      
         4) Correct fdputs in socket layer, from Miaohe Lin.
      
         5) Revert troublesome sockptr_t optimization, from Christoph Hellwig.
      
         6) Fix TCP TFO key reading on big endian, from Jason Baron.
      
         7) Missing CAP_NET_RAW check in nfc, from Qingyu Li.
      
         8) Fix inet fastreuse optimization with tproxy sockets, from Tim
            Froidcoeur.
      
         9) Fix 64-bit divide in new SFC driver, from Edward Cree.
      
        10) Add a tracepoint for prandom_u32 so that we can more easily
            perform usage analysis. From Eric Dumazet.
      
        11) Fix rwlock imbalance in AF_PACKET, from John Ogness"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (49 commits)
        net: openvswitch: introduce common code for flushing flows
        af_packet: TPACKET_V3: fix fill status rwlock imbalance
        random32: add a tracepoint for prandom_u32()
        Revert "ipv4: tunnel: fix compilation on ARCH=um"
        net: accept an empty mask in /sys/class/net/*/queues/rx-*/rps_cpus
        net: ethernet: stmmac: Disable hardware multicast filter
        net: stmmac: dwmac1000: provide multicast filter fallback
        ipv4: tunnel: fix compilation on ARCH=um
        vsock: fix potential null pointer dereference in vsock_poll()
        sfc: fix ef100 design-param checking
        net: initialize fastreuse on inet_inherit_port
        net: refactor bind_bucket fastreuse into helper
        net: phy: marvell10g: fix null pointer dereference
        net: Fix potential memory leak in proto_register()
        net: qcom/emac: add missed clk_disable_unprepare in error path of emac_clks_phase1_init
        ionic_lif: Use devm_kcalloc() in ionic_qcq_alloc()
        net/nfc/rawsock.c: add CAP_NET_RAW check.
        hinic: fix strncpy output truncated compile warnings
        drivers/net/wan/x25_asy: Added needed_headroom and a skb->len check
        net/tls: Fix kmap usage
        ...
      a1d21081
    • Linus Torvalds's avatar
      Merge branch 'i2c/for-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · e764a1e3
      Linus Torvalds authored
      Pull i2c updates from Wolfram Sang:
      
       - bus recovery can now be given a pinctrl handle and the I2C core will
         do all the steps to switch to/from GPIO which can save quite some
         boilerplate code from drivers
      
       - "fallthrough" conversion
      
       - driver updates, mostly ID additions
      
      * 'i2c/for-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (32 commits)
        i2c: iproc: fix race between client unreg and isr
        i2c: eg20t: use generic power management
        i2c: eg20t: Drop PCI wakeup calls from .suspend/.resume
        i2c: mediatek: Fix i2c_spec_values description
        i2c: mediatek: Add i2c compatible for MediaTek MT8192
        dt-bindings: i2c: update bindings for MT8192 SoC
        i2c: mediatek: Add access to more than 8GB dram in i2c driver
        i2c: mediatek: Add apdma sync in i2c driver
        i2c: i801: Add support for Intel Tiger Lake PCH-H
        i2c: i801: Add support for Intel Emmitsburg PCH
        i2c: bcm2835: Replace HTTP links with HTTPS ones
        Documentation: i2c: dev: 'block process call' is supported
        i2c: at91: Move to generic GPIO bus recovery
        i2c: core: treat EPROBE_DEFER when acquiring SCL/SDA GPIOs
        i2c: core: add generic I2C GPIO recovery
        dt-bindings: i2c: add generic properties for GPIO bus recovery
        i2c: rcar: avoid race when unregistering slave
        i2c: tegra: Avoid tegra_i2c_init_dma() for Tegra210 vi i2c
        i2c: tegra: Fix runtime resume to re-init VI I2C
        i2c: tegra: Fix the error path in tegra_i2c_runtime_resume
        ...
      e764a1e3
  2. 13 Aug, 2020 11 commits
    • Tonghao Zhang's avatar
      net: openvswitch: introduce common code for flushing flows · 1f3a090b
      Tonghao Zhang authored
      To avoid some issues, for example RCU usage warning and double free,
      we should flush the flows under ovs_lock. This patch refactors
      table_instance_destroy and introduces table_instance_flow_flush
      which can be invoked by __dp_destroy or ovs_flow_tbl_flush.
      
      Fixes: 50b0e61b ("net: openvswitch: fix possible memleak on destroy flow-table")
      Reported-by: default avatarJohan Knöös <jknoos@google.com>
      Reported-at: https://mail.openvswitch.org/pipermail/ovs-discuss/2020-August/050489.htmlSigned-off-by: default avatarTonghao Zhang <xiangxia.m.yue@gmail.com>
      Reviewed-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1f3a090b
    • John Ogness's avatar
      af_packet: TPACKET_V3: fix fill status rwlock imbalance · 88fd1cb8
      John Ogness authored
      After @blk_fill_in_prog_lock is acquired there is an early out vnet
      situation that can occur. In that case, the rwlock needs to be
      released.
      
      Also, since @blk_fill_in_prog_lock is only acquired when @tp_version
      is exactly TPACKET_V3, only release it on that exact condition as
      well.
      
      And finally, add sparse annotation so that it is clearer that
      prb_fill_curr_block() and prb_clear_blk_fill_status() are acquiring
      and releasing @blk_fill_in_prog_lock, respectively. sparse is still
      unable to understand the balance, but the warnings are now on a
      higher level that make more sense.
      
      Fixes: 632ca50f ("af_packet: TPACKET_V3: replace busy-wait loop")
      Signed-off-by: default avatarJohn Ogness <john.ogness@linutronix.de>
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      88fd1cb8
    • Eric Dumazet's avatar
      random32: add a tracepoint for prandom_u32() · 94c7eb54
      Eric Dumazet authored
      There has been some heat around prandom_u32() lately, and some people
      were wondering if there was a simple way to determine how often
      it was used, before considering making it maybe 10 times more expensive.
      
      This tracepoint exports the generated pseudo random value.
      
      Tested:
      
      perf list | grep prandom_u32
        random:prandom_u32                                 [Tracepoint event]
      
      perf record -a [-g] [-C1] -e random:prandom_u32 sleep 1
      [ perf record: Woken up 0 times to write data ]
      [ perf record: Captured and wrote 259.748 MB perf.data (924087 samples) ]
      
      perf report --nochildren
          ...
          97.67%  ksoftirqd/1     [kernel.vmlinux]  [k] prandom_u32
                  |
                  ---prandom_u32
                     prandom_u32
                     |
                     |--48.86%--tcp_v4_syn_recv_sock
                     |          tcp_check_req
                     |          tcp_v4_rcv
                     |          ...
                      --48.81%--tcp_conn_request
                                tcp_v4_conn_request
                                tcp_rcv_state_process
                                ...
      perf script
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Cc: Willy Tarreau <w@1wt.eu>
      Cc: Sedat Dilek <sedat.dilek@gmail.com>
      Tested-by: default avatarSedat Dilek <sedat.dilek@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      94c7eb54
    • Linus Torvalds's avatar
      Merge tag 'docs-5.9-2' of git://git.lwn.net/linux · dddcbc13
      Linus Torvalds authored
      Pull documentation fixes from Jonathan Corbet:
       "A handful of obvious fixes that wandered in during the merge window"
      
      * tag 'docs-5.9-2' of git://git.lwn.net/linux:
        Documentation/locking/locktypes: fix the typo
        doc/zh_CN: resolve undefined label warning in admin-guide index
        doc/zh_CN: fix title heading markup in admin-guide cpu-load
        docs: remove the 2.6 "Upgrading I2C Drivers" guide
        docs: Correct the release date of 5.2 stable
        mailmap: Update comments for with format and more detalis
        docs: cdrom: Fix a typo and rst markup
        Doc: admin-guide: use correct legends in kernel-parameters.txt
        Documentation/features: refresh RISC-V arch support files
        documentation: coccinelle: Improve command example for make C={1,2}
        Core-api: Documentation: Replace deprecated :c:func: Usage
        Dev-tools: Documentation: Replace deprecated :c:func: Usage
        Filesystems: Documentation: Replace deprecated :c:func: Usage
        docs: trace: fix a typo
      dddcbc13
    • Huang Shijie's avatar
      1edcd467
    • Linus Torvalds's avatar
      Merge tag 's390-5.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · 990f2273
      Linus Torvalds authored
      Pull more s390 updates from Heiko Carstens:
      
       - Allow s390 debug feature to handle finally more than 256 CPU numbers,
         instead of truncating the most significant bits.
      
       - Improve THP splitting required by qemu processes by making use of
         walk_page_vma() instead of calling follow_page() for every single
         page within each vma.
      
       - Add missing ZCRYPT dependency to VFIO_AP to fix potential compile
         problems.
      
       - Remove not required select CLOCKSOURCE_VALIDATE_LAST_CYCLE again.
      
       - Set node distance to LOCAL_DISTANCE instead of 0, since e.g. libnuma
         translates a node distance of 0 to "no NUMA support available".
      
       - Couple of other minor fixes and improvements.
      
      * tag 's390-5.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390/numa: move code to arch/s390/kernel
        s390/time: remove select CLOCKSOURCE_VALIDATE_LAST_CYCLE again
        s390/debug: debug feature version 3
        s390/Kconfig: add missing ZCRYPT dependency to VFIO_AP
        s390/numa: set node distance to LOCAL_DISTANCE
        s390/pkey: remove redundant variable initialization
        s390/test_unwind: fix possible memleak in test_unwind()
        s390/gmap: improve THP splitting
        s390/atomic: circumvent gcc 10 build regression
      990f2273
    • Linus Torvalds's avatar
      Merge tag 'for-5.9-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · 23c2c8c6
      Linus Torvalds authored
      Pull more btrfs updates from David Sterba:
       "One minor update, the rest are fixes that have arrived a bit late for
        the first batch. There are also some recent fixes for bugs that were
        discovered during the merge window and pop up during testing.
      
        User visible change:
      
         - show correct subvolume path in /proc/mounts for bind mounts
      
        Fixes:
      
         - fix compression messages when remounting with different level or
           compression algorithm
      
         - tree-log: fix some memory leaks on error handling paths
      
         - restore I_VERSION on remount
      
         - fix return values and error code mixups
      
         - fix umount crash with quotas enabled when removing sysfs files
      
         - fix trim range on a shrunk device"
      
      * tag 'for-5.9-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
        btrfs: trim: fix underflow in trim length to prevent access beyond device boundary
        btrfs: fix return value mixup in btrfs_get_extent
        btrfs: sysfs: fix NULL pointer dereference at btrfs_sysfs_del_qgroups()
        btrfs: check correct variable after allocation in btrfs_backref_iter_alloc
        btrfs: make sure SB_I_VERSION doesn't get unset by remount
        btrfs: fix memory leaks after failure to lookup checksums during inode logging
        btrfs: don't show full path of bind mounts in subvol=
        btrfs: fix messages after changing compression level by remount
        btrfs: only search for left_info if there is no right_info in try_merge_free_space
        btrfs: inode: fix NULL pointer dereference if inode doesn't need compression
      23c2c8c6
    • Linus Torvalds's avatar
      Merge tag 'xfs-5.9-merge-8' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux · 69307ade
      Linus Torvalds authored
      Pull xfs fixes from Darrick Wong:
       "Two small fixes that have come in during the past week:
      
         - Fix duplicated words in comments
      
         - Fix an ubsan complaint about null pointer arithmetic"
      
      * tag 'xfs-5.9-merge-8' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
        xfs: Fix UBSAN null-ptr-deref in xfs_sysfs_init
        xfs: delete duplicated words + other fixes
      69307ade
    • Linus Torvalds's avatar
      Merge tag 'exfat-for-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat · ff419b61
      Linus Torvalds authored
      Pull exfat updates from Namjae Jeon:
      
       - don't clear MediaFailure and VolumeDirty bit in volume flags if these
         were already set before mounting
      
       - write multiple dirty buffers at once in sync mode
      
       - remove unneeded EXFAT_SB_DIRTY bit set
      
      * tag 'exfat-for-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat:
        exfat: retain 'VolumeFlags' properly
        exfat: optimize exfat_zeroed_cluster()
        exfat: add error check when updating dir-entries
        exfat: write multiple sectors at once
        exfat: remove EXFAT_SB_DIRTY flag
      ff419b61
    • Johannes Weiner's avatar
      mm: memcontrol: fix warning when allocating the root cgroup · 9f457179
      Johannes Weiner authored
      Commit 3e38e0aa ("mm: memcg: charge memcg percpu memory to the
      parent cgroup") adds memory tracking to the memcg kernel structures
      themselves to make cgroups liable for the memory they are consuming
      through the allocation of child groups (which can be significant).
      
      This code is a bit awkward as it's spread out through several functions:
      The outermost function does memalloc_use_memcg(parent) to set up
      current->active_memcg, which designates which cgroup to charge, and the
      inner functions pass GFP_ACCOUNT to request charging for specific
      allocations.  To make sure this dependency is satisfied at all times -
      to make sure we don't randomly charge whoever is calling the functions -
      the inner functions warn on !current->active_memcg.
      
      However, this triggers a false warning when the root memcg itself is
      allocated.  No parent exists in this case, and so current->active_memcg
      is rightfully NULL.  It's a false positive, not indicative of a bug.
      
      Delete the warnings for now, we can revisit this later.
      
      Fixes: 3e38e0aa ("mm: memcg: charge memcg percpu memory to the parent cgroup")
      Signed-off-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
      Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Acked-by: default avatarRoman Gushchin <guro@fb.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9f457179
    • Linus Torvalds's avatar
      Merge tag 'rtc-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux · dc06fe51
      Linus Torvalds authored
      Pull RTC updates from Alexandre Belloni:
       "Not much this cycle - mostly non urgent driver fixes:
      
         - ds1374: use watchdog core
      
         - pcf2127: add alarm and pcf2129 support"
      
      * tag 'rtc-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux:
        rtc: pcf2127: fix alarm handling
        rtc: pcf2127: add alarm support
        rtc: pcf2127: add pca2129 device id
        rtc: max77686: Fix wake-ups for max77620
        rtc: ds1307: provide an indication that the watchdog has fired
        rtc: ds1374: remove unused define
        rtc: ds1374: fix RTC_DRV_DS1374_WDT dependencies
        rtc: cleanup obsolete comment about struct rtc_class_ops
        rtc: pl031: fix set_alarm by adding back call to alarm_irq_enable
        rtc: ds1374: wdt: Use watchdog core for watchdog part
        rtc: Replace HTTP links with HTTPS ones
        rtc: goldfish: Enable interrupt in set_alarm() when necessary
        rtc: max77686: Do not allow interrupt to fire before system resume
        rtc: imxdi: fix trivial typos
        rtc: cpcap: fix range
      dc06fe51
  3. 12 Aug, 2020 24 commits
    • David S. Miller's avatar
      Revert "ipv4: tunnel: fix compilation on ARCH=um" · 96436094
      David S. Miller authored
      This reverts commit 06a7a37b.
      
      The bug was already fixed, this added a dup include.
      Reported-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      96436094
    • Eric Dumazet's avatar
      net: accept an empty mask in /sys/class/net/*/queues/rx-*/rps_cpus · 2e0d8fef
      Eric Dumazet authored
      We must accept an empty mask in store_rps_map(), or we are not able
      to disable RPS on a queue.
      
      Fixes: 07bbecb3 ("net: Restrict receive packets queuing to housekeeping CPUs")
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Reported-by: default avatarMaciej Żenczykowski <maze@google.com>
      Cc: Alex Belits <abelits@marvell.com>
      Cc: Nitesh Narayan Lal <nitesh@redhat.com>
      Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
      Reviewed-by: default avatarMaciej Żenczykowski <maze@google.com>
      Acked-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Acked-by: default avatarNitesh Narayan Lal <nitesh@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2e0d8fef
    • David S. Miller's avatar
      Merge branch 'net-stmmac-Fix-multicast-filter-on-IPQ806x' · ae8bd302
      David S. Miller authored
      Jonathan McDowell says:
      
      ====================
      net: stmmac: Fix multicast filter on IPQ806x
      
      This pair of patches are the result of discovering a failure to
      correctly receive IPv6 multicast packets on such a device (in particular
      DHCPv6 requests and RA solicitations). Putting the device into
      promiscuous mode, or allmulti, both resulted in such packets correctly
      being received. Examination of the vendor driver (nss-gmac from the
      qsdk) shows that it does not enable the multicast filter and instead
      falls back to allmulti.
      
      Extend the base dwmac1000 driver to fall back when there's no suitable
      hardware filter, and update the ipq806x platform to request this.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ae8bd302
    • Jonathan McDowell's avatar
      net: ethernet: stmmac: Disable hardware multicast filter · df43dd52
      Jonathan McDowell authored
      The IPQ806x does not appear to have a functional multicast ethernet
      address filter. This was observed as a failure to correctly receive IPv6
      packets on a LAN to the all stations address. Checking the vendor driver
      shows that it does not attempt to enable the multicast filter and
      instead falls back to receiving all multicast packets, internally
      setting ALLMULTI.
      
      Use the new fallback support in the dwmac1000 driver to correctly
      achieve the same with the mainline IPQ806x driver. Confirmed to fix IPv6
      functionality on an RB3011 router.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarJonathan McDowell <noodles@earth.li>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      df43dd52
    • Jonathan McDowell's avatar
      net: stmmac: dwmac1000: provide multicast filter fallback · 592d751c
      Jonathan McDowell authored
      If we don't have a hardware multicast filter available then instead of
      silently failing to listen for the requested ethernet broadcast
      addresses fall back to receiving all multicast packets, in a similar
      fashion to other drivers with no multicast filter.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarJonathan McDowell <noodles@earth.li>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      592d751c
    • Dhananjay Phadke's avatar
      i2c: iproc: fix race between client unreg and isr · b1eef236
      Dhananjay Phadke authored
      When i2c client unregisters, synchronize irq before setting
      iproc_i2c->slave to NULL.
      
      (1) disable_irq()
      (2) Mask event enable bits in control reg
      (3) Erase slave address (avoid further writes to rx fifo)
      (4) Flush tx and rx FIFOs
      (5) Clear pending event (interrupt) bits in status reg
      (6) enable_irq()
      (7) Set client pointer to NULL
      
      Unable to handle kernel NULL pointer dereference at virtual address 0000000000000318
      
      [  371.020421] pc : bcm_iproc_i2c_isr+0x530/0x11f0
      [  371.025098] lr : __handle_irq_event_percpu+0x6c/0x170
      [  371.030309] sp : ffff800010003e40
      [  371.033727] x29: ffff800010003e40 x28: 0000000000000060
      [  371.039206] x27: ffff800010ca9de0 x26: ffff800010f895df
      [  371.044686] x25: ffff800010f18888 x24: ffff0008f7ff3600
      [  371.050165] x23: 0000000000000003 x22: 0000000001600000
      [  371.055645] x21: ffff800010f18888 x20: 0000000001600000
      [  371.061124] x19: ffff0008f726f080 x18: 0000000000000000
      [  371.066603] x17: 0000000000000000 x16: 0000000000000000
      [  371.072082] x15: 0000000000000000 x14: 0000000000000000
      [  371.077561] x13: 0000000000000000 x12: 0000000000000001
      [  371.083040] x11: 0000000000000000 x10: 0000000000000040
      [  371.088519] x9 : ffff800010f317c8 x8 : ffff800010f317c0
      [  371.093999] x7 : ffff0008f805b3b0 x6 : 0000000000000000
      [  371.099478] x5 : ffff0008f7ff36a4 x4 : ffff8008ee43d000
      [  371.104957] x3 : 0000000000000000 x2 : ffff8000107d64c0
      [  371.110436] x1 : 00000000c00000af x0 : 0000000000000000
      
      [  371.115916] Call trace:
      [  371.118439]  bcm_iproc_i2c_isr+0x530/0x11f0
      [  371.122754]  __handle_irq_event_percpu+0x6c/0x170
      [  371.127606]  handle_irq_event_percpu+0x34/0x88
      [  371.132189]  handle_irq_event+0x40/0x120
      [  371.136234]  handle_fasteoi_irq+0xcc/0x1a0
      [  371.140459]  generic_handle_irq+0x24/0x38
      [  371.144594]  __handle_domain_irq+0x60/0xb8
      [  371.148820]  gic_handle_irq+0xc0/0x158
      [  371.152687]  el1_irq+0xb8/0x140
      [  371.155927]  arch_cpu_idle+0x10/0x18
      [  371.159615]  do_idle+0x204/0x290
      [  371.162943]  cpu_startup_entry+0x24/0x60
      [  371.166990]  rest_init+0xb0/0xbc
      [  371.170322]  arch_call_rest_init+0xc/0x14
      [  371.174458]  start_kernel+0x404/0x430
      
      Fixes: c245d94e ("i2c: iproc: Add multi byte read-write support for slave mode")
      Signed-off-by: default avatarDhananjay Phadke <dphadke@linux.microsoft.com>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Acked-by: default avatarRay Jui <ray.jui@broadcom.com>
      Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
      b1eef236
    • Johannes Berg's avatar
      ipv4: tunnel: fix compilation on ARCH=um · 06a7a37b
      Johannes Berg authored
      With certain configurations, a 64-bit ARCH=um errors
      out here with an unknown csum_ipv6_magic() function.
      Include the right header file to always have it.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      06a7a37b
    • Stefano Garzarella's avatar
      vsock: fix potential null pointer dereference in vsock_poll() · 1980c058
      Stefano Garzarella authored
      syzbot reported this issue where in the vsock_poll() we find the
      socket state at TCP_ESTABLISHED, but 'transport' is null:
        general protection fault, probably for non-canonical address 0xdffffc0000000012: 0000 [#1] PREEMPT SMP KASAN
        KASAN: null-ptr-deref in range [0x0000000000000090-0x0000000000000097]
        CPU: 0 PID: 8227 Comm: syz-executor.2 Not tainted 5.8.0-rc7-syzkaller #0
        Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
        RIP: 0010:vsock_poll+0x75a/0x8e0 net/vmw_vsock/af_vsock.c:1038
        Call Trace:
         sock_poll+0x159/0x460 net/socket.c:1266
         vfs_poll include/linux/poll.h:90 [inline]
         do_pollfd fs/select.c:869 [inline]
         do_poll fs/select.c:917 [inline]
         do_sys_poll+0x607/0xd40 fs/select.c:1011
         __do_sys_poll fs/select.c:1069 [inline]
         __se_sys_poll fs/select.c:1057 [inline]
         __x64_sys_poll+0x18c/0x440 fs/select.c:1057
         do_syscall_64+0x60/0xe0 arch/x86/entry/common.c:384
         entry_SYSCALL_64_after_hwframe+0x44/0xa9
      
      This issue can happen if the TCP_ESTABLISHED state is set after we read
      the vsk->transport in the vsock_poll().
      
      We could put barriers to synchronize, but this can only happen during
      connection setup, so we can simply check that 'transport' is valid.
      
      Fixes: c0cfa2d8 ("vsock: add multi-transports support")
      Reported-and-tested-by: syzbot+a61bac2fcc1a7c6623fe@syzkaller.appspotmail.com
      Signed-off-by: default avatarStefano Garzarella <sgarzare@redhat.com>
      Reviewed-by: default avatarJorgen Hansen <jhansen@vmware.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1980c058
    • Edward Cree's avatar
      sfc: fix ef100 design-param checking · 41077c99
      Edward Cree authored
      The handling of the RXQ/TXQ size granularity design-params had two
       problems: it had a 64-bit divide that didn't build on 32-bit platforms,
       and it could divide by zero if the NIC supplied 0 as the value of the
       design-param.  Fix both by checking for 0 and for a granularity bigger
       than our min-size; if the granularity <= EFX_MIN_DMAQ_SIZE then it fits
       in 32 bits, so we can cast it to u32 for the divide.
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Signed-off-by: default avatarEdward Cree <ecree@solarflare.com>
      Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      41077c99
    • Linus Torvalds's avatar
      Merge tag 'ceph-for-5.9-rc1' of git://github.com/ceph/ceph-client · 7c2a69f6
      Linus Torvalds authored
      Pull ceph updates from Ilya Dryomov:
       "Xiubo has completed his work on filesystem client metrics, they are
        sent to all available MDSes once per second now.
      
        Other than that, we have a lot of fixes and cleanups all around the
        filesystem, including a tweak to cut down on MDS request resends in
        multi-MDS setups from Yanhu and fixups for SELinux symlink labeling
        and MClientSession message decoding from Jeff"
      
      * tag 'ceph-for-5.9-rc1' of git://github.com/ceph/ceph-client: (22 commits)
        ceph: handle zero-length feature mask in session messages
        ceph: use frag's MDS in either mode
        ceph: move sb->wb_pagevec_pool to be a global mempool
        ceph: set sec_context xattr on symlink creation
        ceph: remove redundant initialization of variable mds
        ceph: fix use-after-free for fsc->mdsc
        ceph: remove unused variables in ceph_mdsmap_decode()
        ceph: delete repeated words in fs/ceph/
        ceph: send client provided metric flags in client metadata
        ceph: periodically send perf metrics to MDSes
        ceph: check the sesion state and return false in case it is closed
        libceph: replace HTTP links with HTTPS ones
        ceph: remove unnecessary cast in kfree()
        libceph: just have osd_req_op_init() return a pointer
        ceph: do not access the kiocb after aio requests
        ceph: clean up and optimize ceph_check_delayed_caps()
        ceph: fix potential mdsc use-after-free crash
        ceph: switch to WARN_ON_ONCE in encode_supported_features()
        ceph: add global total_caps to count the mdsc's total caps number
        ceph: add check_session_state() helper and make it global
        ...
      7c2a69f6
    • Linus Torvalds's avatar
      Merge branch 'parisc-5.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux · 7a02c8d4
      Linus Torvalds authored
      Pull more parisc updates from Helge Deller:
      
       - Oscar Carter contributed a patch which fixes parisc's usage of
         dereference_function_descriptor() and thus will allow using the
         -Wcast-function-type compiler option in the top-level Makefile
      
       - Sven Schnelle fixed a bug in the SBA code to prevent crashes during
         kexec
      
       - John David Anglin provided implementations for __smp_store_release()
         and __smp_load_acquire barriers() which avoids using the sync
         assembler instruction and thus speeds up barrier paths
      
       - Some whitespace cleanups in parisc's atomic.h header file
      
      * 'parisc-5.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
        parisc: Implement __smp_store_release and __smp_load_acquire barriers
        parisc: mask out enable and reserved bits from sba imask
        parisc: Whitespace cleanups in atomic.h
        parisc/kernel/ftrace: Remove function callback casts
        sections.h: dereference_function_descriptor() returns void pointer
      7a02c8d4
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 8cd84b70
      Linus Torvalds authored
      Pull more KVM updates from Paolo Bonzini:
       "PPC:
         - Improvements and bugfixes for secure VM support, giving reduced
           startup time and memory hotplug support.
      
         - Locking fixes in nested KVM code
      
         - Increase number of guests supported by HV KVM to 4094
      
         - Preliminary POWER10 support
      
        ARM:
         - Split the VHE and nVHE hypervisor code bases, build the EL2 code
           separately, allowing for the VHE code to now be built with
           instrumentation
      
         - Level-based TLB invalidation support
      
         - Restructure of the vcpu register storage to accomodate the NV code
      
         - Pointer Authentication available for guests on nVHE hosts
      
         - Simplification of the system register table parsing
      
         - MMU cleanups and fixes
      
         - A number of post-32bit cleanups and other fixes
      
        MIPS:
         - compilation fixes
      
        x86:
         - bugfixes
      
         - support for the SERIALIZE instruction"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (70 commits)
        KVM: MIPS/VZ: Fix build error caused by 'kvm_run' cleanup
        x86/kvm/hyper-v: Synic default SCONTROL MSR needs to be enabled
        MIPS: KVM: Convert a fallthrough comment to fallthrough
        MIPS: VZ: Only include loongson_regs.h for CPU_LOONGSON64
        x86: Expose SERIALIZE for supported cpuid
        KVM: x86: Don't attempt to load PDPTRs when 64-bit mode is enabled
        KVM: arm64: Move S1PTW S2 fault logic out of io_mem_abort()
        KVM: arm64: Don't skip cache maintenance for read-only memslots
        KVM: arm64: Handle data and instruction external aborts the same way
        KVM: arm64: Rename kvm_vcpu_dabt_isextabt()
        KVM: arm: Add trace name for ARM_NISV
        KVM: arm64: Ensure that all nVHE hyp code is in .hyp.text
        KVM: arm64: Substitute RANDOMIZE_BASE for HARDEN_EL2_VECTORS
        KVM: arm64: Make nVHE ASLR conditional on RANDOMIZE_BASE
        KVM: PPC: Book3S HV: Rework secure mem slot dropping
        KVM: PPC: Book3S HV: Move kvmppc_svm_page_out up
        KVM: PPC: Book3S HV: Migrate hot plugged memory
        KVM: PPC: Book3S HV: In H_SVM_INIT_DONE, migrate remaining normal-GFNs to secure-GFNs
        KVM: PPC: Book3S HV: Track the state GFNs associated with secure VMs
        KVM: PPC: Book3S HV: Disable page merging in H_SVM_INIT_START
        ...
      8cd84b70
    • Linus Torvalds's avatar
      Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux · 05a5b5d8
      Linus Torvalds authored
      Pull more clk updates from Stephen Boyd:
       "Here's some more updates that missed the last pull request because I
        happened to tag the tree at an earlier point in the history of
        clk-next. I must have fat fingered it and checked out an older version
        of clk-next on this second computer I'm using.
      
        This time it actually includes more code for Qualcomm SoCs, the AT91
        major updates, and some Rockchip SoC clk driver updates as well. I've
        corrected this flow so this shouldn't happen again"
      
      * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (83 commits)
        clk: bcm2835: Do not use prediv with bcm2711's PLLs
        clk: drop unused function __clk_get_flags
        clk: hsdk: Fix bad dependency on IOMEM
        dt-bindings: clock: Fix YAML schemas for LPASS clocks on SC7180
        clk: mmp: avoid missing prototype warning
        clk: sparx5: Add Sparx5 SoC DPLL clock driver
        dt-bindings: clock: sparx5: Add bindings include file
        clk: qoriq: add LS1021A core pll mux options
        clk: clk-atlas6: fix return value check in atlas6_clk_init()
        clk: tegra: pll: Improve PLLM enable-state detection
        clk: X1000: Add support for calculat REFCLK of USB PHY.
        clk: JZ4780: Reformat the code to align it.
        clk: JZ4780: Add functions for enable and disable USB PHY.
        clk: Ingenic: Add RTC related clocks for Ingenic SoCs.
        dt-bindings: clock: Add tabs to align code.
        dt-bindings: clock: Add RTC related clocks for Ingenic SoCs.
        clk: davinci: Use fallthrough pseudo-keyword
        clk: imx: Use fallthrough pseudo-keyword
        clk: qcom: gcc-sdm660: Fix up gcc_mss_mnoc_bimc_axi_clk
        clk: qcom: gcc-sdm660: Add missing modem reset
        ...
      05a5b5d8
    • Linus Torvalds's avatar
      Merge tag 'linux-watchdog-5.9-rc1' of git://www.linux-watchdog.org/linux-watchdog · 45860394
      Linus Torvalds authored
      Pull watchdog updates from Wim Van Sebroeck:
      
       - f71808e_wdt imporvements
      
       - dw_wdt improvements
      
       - mlx-wdt: support new watchdog type with longer timeout period
      
       - fallthrough pseudo-keyword replacements
      
       - overall small fixes and improvements
      
      * tag 'linux-watchdog-5.9-rc1' of git://www.linux-watchdog.org/linux-watchdog: (35 commits)
        watchdog: rti-wdt: balance pm runtime enable calls
        watchdog: rti-wdt: attach to running watchdog during probe
        watchdog: add support for adjusting last known HW keepalive time
        watchdog: use __watchdog_ping in startup
        watchdog: softdog: Add options 'soft_reboot_cmd' and 'soft_active_on_boot'
        watchdog: pcwd_usb: remove needless check before usb_free_coherent()
        watchdog: Replace HTTP links with HTTPS ones
        dt-bindings: watchdog: renesas,wdt: Document r8a774e1 support
        watchdog: initialize device before misc_register
        watchdog: booke_wdt: Add common nowayout parameter driver
        watchdog: scx200_wdt: Use fallthrough pseudo-keyword
        watchdog: Use fallthrough pseudo-keyword
        watchdog: f71808e_wdt: do stricter parameter validation
        watchdog: f71808e_wdt: clear watchdog timeout occurred flag
        watchdog: f71808e_wdt: remove use of wrong watchdog_info option
        watchdog: f71808e_wdt: indicate WDIOF_CARDRESET support in watchdog_info.options
        docs: watchdog: codify ident.options as superset of possible status flags
        dt-bindings: watchdog: Add compatible for QCS404, SC7180, SDM845, SM8150
        dt-bindings: watchdog: Convert QCOM watchdog timer bindings to YAML
        watchdog: dw_wdt: Add DebugFS files
        ...
      45860394
    • Linus Torvalds's avatar
      Merge tag 'vfio-v5.9-rc1' of git://github.com/awilliam/linux-vfio · 407bc8d8
      Linus Torvalds authored
      Pull VFIO updates from Alex Williamson:
      
       - Inclusive naming updates (Alex Williamson)
      
       - Intel X550 INTx quirk (Alex Williamson)
      
       - Error path resched between unmaps (Xiang Zheng)
      
       - SPAPR IOMMU pin_user_pages() conversion (John Hubbard)
      
       - Trivial mutex simplification (Alex Williamson)
      
       - QAT device denylist (Giovanni Cabiddu)
      
       - type1 IOMMU ioctl refactor (Liu Yi L)
      
      * tag 'vfio-v5.9-rc1' of git://github.com/awilliam/linux-vfio:
        vfio/type1: Refactor vfio_iommu_type1_ioctl()
        vfio/pci: Add QAT devices to denylist
        vfio/pci: Add device denylist
        PCI: Add Intel QuickAssist device IDs
        vfio/pci: Hold igate across releasing eventfd contexts
        vfio/spapr_tce: convert get_user_pages() --> pin_user_pages()
        vfio/type1: Add conditional rescheduling after iommu map failed
        vfio/pci: Add Intel X550 to hidden INTx devices
        vfio: Cleanup allowed driver naming
      407bc8d8
    • Linus Torvalds's avatar
      Merge tag 'drm-next-2020-08-12' of git://anongit.freedesktop.org/drm/drm · ea6ec774
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "This has a few vmwgfx regression fixes we hit from the merge window
        (one in TTM), it also has a bunch of amdgpu fixes along with a
        scattering everywhere else.
      
        core:
         - Fix drm_dp_mst_port refcount leaks in drm_dp_mst_allocate_vcpi
         - Remove null check for kfree in drm_dev_release.
         - Fix DRM_FORMAT_MOD_AMLOGIC_FBC definition.
         - re-added docs for drm_gem_flink_ioctl()
         - add orientation quirk for ASUS T103HAF
      
        ttm:
         - ttm: fix page-offset calculation within TTM
         - revert patch causing vmwgfx regressions
      
        fbcon:
         - Fix a fbcon OOB read in fbdev, found by syzbot.
      
        vga:
         - Mark vga_tryget static as it's not used elsewhere.
      
        amdgpu:
         - Re-add spelling typo fix
         - Sienna Cichlid fixes
         - Navy Flounder fixes
         - DC fixes
         - SMU i2c fix
         - Power fixes
      
        vmwgfx:
         - regression fixes for modesetting crashes
         - misc fixes
      
        xlnx:
         - Small fixes to xlnx.
      
        omap:
         - Fix mode initialization in omap_connector_mode_valid().
         - force runtime PM suspend on system suspend
      
        tidss:
         - fix modeset init for DPI panels"
      
      * tag 'drm-next-2020-08-12' of git://anongit.freedesktop.org/drm/drm: (70 commits)
        drm/ttm: revert "drm/ttm: make TT creation purely optional v3"
        drm/vmwgfx: fix spelling mistake "Cant" -> "Can't"
        drm/vmwgfx: fix spelling mistake "Cound" -> "Could"
        drm/vmwgfx/ldu: Use drm_mode_config_reset
        drm/vmwgfx/sou: Use drm_mode_config_reset
        drm/vmwgfx/stdu: Use drm_mode_config_reset
        drm/vmwgfx: Fix two list_for_each loop exit tests
        drm/vmwgfx: Use correct vmw_legacy_display_unit pointer
        drm/vmwgfx: Use struct_size() helper
        drm/amdgpu: Fix bug where DPM is not enabled after hibernate and resume
        drm/amd/powerplay: put VCN/JPEG into PG ungate state before dpm table setup(V3)
        drm/amd/powerplay: update swSMU VCN/JPEG PG logics
        drm/amdgpu: use mode1 reset by default for sienna_cichlid
        drm/amdgpu/smu: rework i2c adpater registration
        drm/amd/display: Display goes blank after inst
        drm/amd/display: Change null plane state swizzle mode to 4kb_s
        drm/amd/display: Use helper function to check for HDMI signal
        drm/amd/display: AMD OUI (DPCD 0x00300) skipped on some sink
        drm/amd/display: Fix logger context
        drm/amd/display: populate new dml variable
        ...
      ea6ec774
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · 9ad57f6d
      Linus Torvalds authored
      Merge more updates from Andrew Morton:
      
       - most of the rest of MM (memcg, hugetlb, vmscan, proc, compaction,
         mempolicy, oom-kill, hugetlbfs, migration, thp, cma, util,
         memory-hotplug, cleanups, uaccess, migration, gup, pagemap),
      
       - various other subsystems (alpha, misc, sparse, bitmap, lib, bitops,
         checkpatch, autofs, minix, nilfs, ufs, fat, signals, kmod, coredump,
         exec, kdump, rapidio, panic, kcov, kgdb, ipc).
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (164 commits)
        mm/gup: remove task_struct pointer for all gup code
        mm: clean up the last pieces of page fault accountings
        mm/xtensa: use general page fault accounting
        mm/x86: use general page fault accounting
        mm/sparc64: use general page fault accounting
        mm/sparc32: use general page fault accounting
        mm/sh: use general page fault accounting
        mm/s390: use general page fault accounting
        mm/riscv: use general page fault accounting
        mm/powerpc: use general page fault accounting
        mm/parisc: use general page fault accounting
        mm/openrisc: use general page fault accounting
        mm/nios2: use general page fault accounting
        mm/nds32: use general page fault accounting
        mm/mips: use general page fault accounting
        mm/microblaze: use general page fault accounting
        mm/m68k: use general page fault accounting
        mm/ia64: use general page fault accounting
        mm/hexagon: use general page fault accounting
        mm/csky: use general page fault accounting
        ...
      9ad57f6d
    • Peter Xu's avatar
      mm/gup: remove task_struct pointer for all gup code · 64019a2e
      Peter Xu authored
      After the cleanup of page fault accounting, gup does not need to pass
      task_struct around any more.  Remove that parameter in the whole gup
      stack.
      Signed-off-by: default avatarPeter Xu <peterx@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Reviewed-by: default avatarJohn Hubbard <jhubbard@nvidia.com>
      Link: http://lkml.kernel.org/r/20200707225021.200906-26-peterx@redhat.comSigned-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      64019a2e
    • Peter Xu's avatar
      mm: clean up the last pieces of page fault accountings · a2beb5f1
      Peter Xu authored
      Here're the last pieces of page fault accounting that were still done
      outside handle_mm_fault() where we still have regs==NULL when calling
      handle_mm_fault():
      
      arch/powerpc/mm/copro_fault.c:   copro_handle_mm_fault
      arch/sparc/mm/fault_32.c:        force_user_fault
      arch/um/kernel/trap.c:           handle_page_fault
      mm/gup.c:                        faultin_page
                                       fixup_user_fault
      mm/hmm.c:                        hmm_vma_fault
      mm/ksm.c:                        break_ksm
      
      Some of them has the issue of duplicated accounting for page fault
      retries.  Some of them didn't do the accounting at all.
      
      This patch cleans all these up by letting handle_mm_fault() to do per-task
      page fault accounting even if regs==NULL (though we'll still skip the perf
      event accountings).  With that, we can safely remove all the outliers now.
      
      There's another functional change in that now we account the page faults
      to the caller of gup, rather than the task_struct that passed into the gup
      code.  More information of this can be found at [1].
      
      After this patch, below things should never be touched again outside
      handle_mm_fault():
      
        - task_struct.[maj|min]_flt
        - PERF_COUNT_SW_PAGE_FAULTS_[MAJ|MIN]
      
      [1] https://lore.kernel.org/lkml/CAHk-=wj_V2Tps2QrMn20_W0OJF9xqNh52XSGA42s-ZJ8Y+GyKw@mail.gmail.com/Signed-off-by: default avatarPeter Xu <peterx@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Cc: Albert Ou <aou@eecs.berkeley.edu>
      Cc: Alexander Gordeev <agordeev@linux.ibm.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Cain <bcain@codeaurora.org>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: Chris Zankel <chris@zankel.net>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Gerald Schaefer <gerald.schaefer@de.ibm.com>
      Cc: Greentime Hu <green.hu@gmail.com>
      Cc: Guo Ren <guoren@kernel.org>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Helge Deller <deller@gmx.de>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: James E.J. Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: John Hubbard <jhubbard@nvidia.com>
      Cc: Jonas Bonn <jonas@southpole.se>
      Cc: Ley Foon Tan <ley.foon.tan@intel.com>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Cc: Matt Turner <mattst88@gmail.com>
      Cc: Max Filippov <jcmvbkbc@gmail.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Nick Hu <nickhu@andestech.com>
      Cc: Palmer Dabbelt <palmer@dabbelt.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Cc: Pekka Enberg <penberg@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Rich Felker <dalias@libc.org>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Stafford Horne <shorne@gmail.com>
      Cc: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Cc: Vincent Chen <deanbo422@gmail.com>
      Cc: Vineet Gupta <vgupta@synopsys.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Link: http://lkml.kernel.org/r/20200707225021.200906-25-peterx@redhat.comSigned-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a2beb5f1
    • Peter Xu's avatar
      mm/xtensa: use general page fault accounting · 484e51e4
      Peter Xu authored
      Use the general page fault accounting by passing regs into
      handle_mm_fault().  It naturally solve the issue of multiple page fault
      accounting when page fault retry happened.
      
      Remove the PERF_COUNT_SW_PAGE_FAULTS_[MAJ|MIN] perf events because it's
      now also done in handle_mm_fault().
      
      Move the PERF_COUNT_SW_PAGE_FAULTS event higher before taking mmap_sem for
      the fault, then it'll match with the rest of the archs.
      Signed-off-by: default avatarPeter Xu <peterx@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Acked-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      Cc: Chris Zankel <chris@zankel.net>
      Link: http://lkml.kernel.org/r/20200707225021.200906-24-peterx@redhat.comSigned-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      484e51e4
    • Peter Xu's avatar
      mm/x86: use general page fault accounting · 968614fc
      Peter Xu authored
      Use the general page fault accounting by passing regs into
      handle_mm_fault().
      Signed-off-by: default avatarPeter Xu <peterx@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Link: http://lkml.kernel.org/r/20200707225021.200906-23-peterx@redhat.comSigned-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      968614fc
    • Peter Xu's avatar
      mm/sparc64: use general page fault accounting · f08147df
      Peter Xu authored
      Use the general page fault accounting by passing regs into
      handle_mm_fault().  It naturally solve the issue of multiple page fault
      accounting when page fault retry happened.
      Signed-off-by: default avatarPeter Xu <peterx@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
      Link: http://lkml.kernel.org/r/20200707225021.200906-22-peterx@redhat.comSigned-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f08147df
    • Peter Xu's avatar
      mm/sparc32: use general page fault accounting · 56e10e6a
      Peter Xu authored
      Use the general page fault accounting by passing regs into
      handle_mm_fault().  It naturally solve the issue of multiple page fault
      accounting when page fault retry happened.
      Signed-off-by: default avatarPeter Xu <peterx@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
      Link: http://lkml.kernel.org/r/20200707225021.200906-21-peterx@redhat.comSigned-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      56e10e6a
    • Peter Xu's avatar
      mm/sh: use general page fault accounting · 105f8862
      Peter Xu authored
      Use the general page fault accounting by passing regs into
      handle_mm_fault().  It naturally solve the issue of multiple page fault
      accounting when page fault retry happened.
      Signed-off-by: default avatarPeter Xu <peterx@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Cc: Rich Felker <dalias@libc.org>
      Link: http://lkml.kernel.org/r/20200707225021.200906-20-peterx@redhat.comSigned-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      105f8862