1. 06 10月, 2020 6 次提交
  2. 25 9月, 2020 25 次提交
  3. 24 9月, 2020 6 次提交
    • L
      mm: fix misplaced unlock_page in do_wp_page() · be068f29
      Linus Torvalds 提交于
      Commit 09854ba9 ("mm: do_wp_page() simplification") reorganized all
      the code around the page re-use vs copy, but in the process also moved
      the final unlock_page() around to after the wp_page_reuse() call.
      
      That normally doesn't matter - but it means that the unlock_page() is
      now done after releasing the page table lock.  Again, not a big deal,
      you'd think.
      
      But it turns out that it's very wrong indeed, because once we've
      released the page table lock, we've basically lost our only reference to
      the page - the page tables - and it could now be free'd at any time.  We
      do hold the mmap_sem, so no actual unmap() can happen, but madvise can
      come in and a MADV_DONTNEED will zap the page range - and free the page.
      
      So now the page may be free'd just as we're unlocking it, which in turn
      will usually trigger a "Bad page state" error in the freeing path.  To
      make matters more confusing, by the time the debug code prints out the
      page state, the unlock has typically completed and everything looks fine
      again.
      
      This all doesn't happen in any normal situations, but it does trigger
      with the dirtyc0w_child LTP test.  And it seems to trigger much more
      easily (but not expclusively) on s390 than elsewhere, probably because
      s390 doesn't do the "batch pages up for freeing after the TLB flush"
      that gives the unlock_page() more time to complete and makes the race
      harder to hit.
      
      Fixes: 09854ba9 ("mm: do_wp_page() simplification")
      Link: https://lore.kernel.org/lkml/a46e9bbef2ed4e17778f5615e818526ef848d791.camel@redhat.com/
      Link: https://lore.kernel.org/linux-mm/c41149a8-211e-390b-af1d-d5eee690fecb@linux.alibaba.com/Reported-by: NQian Cai <cai@redhat.com>
      Reported-by: NAlex Shi <alex.shi@linux.alibaba.com>
      Bisected-and-analyzed-by: NGerald Schaefer <gerald.schaefer@linux.ibm.com>
      Tested-by: NGerald Schaefer <gerald.schaefer@linux.ibm.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      be068f29
    • L
      Merge tag 'trace-v5.9-rc5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace · c9c9e6a4
      Linus Torvalds 提交于
      Pull bootconfig fixes from Steven Rostedt:
       "A couple of fixes for bootconfig.
      
        Masami discovered two bugs which this fixes and he added tests to
        cover these issues.
      
         - Fix a bug that breaks bootconfig tree nodes
      
         - Fix a bug that does not truncate whitespace properly
      
         - Add tests to cover the above two cases"
      
      * tag 'trace-v5.9-rc5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        tools/bootconfig: Add testcase for tailing space
        tools/bootconfig: Add testcases for repeated key with brace
        lib/bootconfig: Fix to remove tailing spaces after value
        lib/bootconfig: Fix a bug of breaking existing tree nodes
      c9c9e6a4
    • L
      Merge tag 'for-5.9/dm-fixes-2' of... · a969324f
      Linus Torvalds 提交于
      Merge tag 'for-5.9/dm-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm
      
      Pull device mapper fixes from Mike Snitzer:
      
       - DM core fix for incorrect double bio splitting. Keep "fixing" this
         because past attempts didn't fully appreciate the liability relative
         to recursive bio splitting. This fix limits DM's bio splitting to a
         single method and does _not_ use blk_queue_split() for normal IO.
      
       - DM crypt Documentation updates for features added during 5.9 merge.
      
      * tag 'for-5.9/dm-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
        dm crypt: document encrypted keyring key option
        dm crypt: document new no_workqueue flags
        dm: fix comment in dm_process_bio()
        dm: fix bio splitting and its bio completion order for regular IO
      a969324f
    • L
      Merge tag 'for-5.9-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · bffac4b5
      Linus Torvalds 提交于
      Pull btrfs fixes from David Sterba:
       "syzkaller started to hit us with reports, here's a fix for one type
        (stack overflow when printing checksums on read error).
      
        The other patch is a fix for sysfs object, we have a test for that and
        it leads to a crash."
      
      * tag 'for-5.9-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
        btrfs: fix put of uninitialized kobject after seed device delete
        btrfs: fix overflow when copying corrupt csums for a message
      bffac4b5
    • L
      mm: move the copy_one_pte() pte_present check into the caller · 79a1971c
      Linus Torvalds 提交于
      This completes the split of the non-present and present pte cases by
      moving the check for the source pte being present into the single
      caller, which also means that we clearly separate out the very different
      return value case for a non-present pte.
      
      The present pte case currently always succeeds.
      
      This is a pure code re-organization with no semantic change: the intent
      is to make it much easier to add a new return case to the present pte
      case for when we do early COW at page table copy time.
      
      This was split out from the previous commit simply to make it easy to
      visually see that there were no semantic changes from this code
      re-organization.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      79a1971c
    • L
      mm: split out the non-present case from copy_one_pte() · df3a57d1
      Linus Torvalds 提交于
      This is a purely mechanical split of the copy_one_pte() function.  It's
      not immediately obvious when looking at the diff because of the
      indentation change, but the way to see what is going on in this commit
      is to use the "-w" flag to not show pure whitespace changes, and you see
      how the first part of copy_one_pte() is simply lifted out into a
      separate function.
      
      And since the non-present case is marked unlikely, don't make the new
      function be inlined.  Not that gcc really seems to care, since it looks
      like it will inline it anyway due to the whole "single callsite for
      static function" logic.  In fact, code generation with the function
      split is almost identical to before.  But not marking it inline is the
      right thing to do.
      
      This is pure prep-work and cleanup for subsequent changes.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      df3a57d1
  4. 23 9月, 2020 3 次提交
    • L
      Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 805c6d3c
      Linus Torvalds 提交于
      Pull vfs fixes from Al Viro:
       "No common topic, just assorted fixes"
      
      * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        fuse: fix the ->direct_IO() treatment of iov_iter
        fs: fix cast in fsparam_u32hex() macro
        vboxsf: Fix the check for the old binary mount-arguments struct
      805c6d3c
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · d3017135
      Linus Torvalds 提交于
      Pull networking fixes from Jakub Kicinski:
      
       - fix failure to add bond interfaces to a bridge, the offload-handling
         code was too defensive there and recent refactoring unearthed that.
         Users complained (Ido)
      
       - fix unnecessarily reflecting ECN bits within TOS values / QoS marking
         in TCP ACK and reset packets (Wei)
      
       - fix a deadlock with bpf iterator. Hopefully we're in the clear on
         this front now... (Yonghong)
      
       - BPF fix for clobbering r2 in bpf_gen_ld_abs (Daniel)
      
       - fix AQL on mt76 devices with FW rate control and add a couple of AQL
         issues in mac80211 code (Felix)
      
       - fix authentication issue with mwifiex (Maximilian)
      
       - WiFi connectivity fix: revert IGTK support in ti/wlcore (Mauro)
      
       - fix exception handling for multipath routes via same device (David
         Ahern)
      
       - revert back to a BH spin lock flavor for nsid_lock: there are paths
         which do require the BH context protection (Taehee)
      
       - fix interrupt / queue / NAPI handling in the lantiq driver (Hauke)
      
       - fix ife module load deadlock (Cong)
      
       - make an adjustment to netlink reply message type for code added in
         this release (the sole change touching uAPI here) (Michal)
      
       - a number of fixes for small NXP and Microchip switches (Vladimir)
      
      [ Pull request acked by David: "you can expect more of this in the
        future as I try to delegate more things to Jakub" ]
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (167 commits)
        net: mscc: ocelot: fix some key offsets for IP4_TCP_UDP VCAP IS2 entries
        net: dsa: seville: fix some key offsets for IP4_TCP_UDP VCAP IS2 entries
        net: dsa: felix: fix some key offsets for IP4_TCP_UDP VCAP IS2 entries
        inet_diag: validate INET_DIAG_REQ_PROTOCOL attribute
        net: bridge: br_vlan_get_pvid_rcu() should dereference the VLAN group under RCU
        net: Update MAINTAINERS for MediaTek switch driver
        net/mlx5e: mlx5e_fec_in_caps() returns a boolean
        net/mlx5e: kTLS, Avoid kzalloc(GFP_KERNEL) under spinlock
        net/mlx5e: kTLS, Fix leak on resync error flow
        net/mlx5e: kTLS, Add missing dma_unmap in RX resync
        net/mlx5e: kTLS, Fix napi sync and possible use-after-free
        net/mlx5e: TLS, Do not expose FPGA TLS counter if not supported
        net/mlx5e: Fix using wrong stats_grps in mlx5e_update_ndo_stats()
        net/mlx5e: Fix multicast counter not up-to-date in "ip -s"
        net/mlx5e: Fix endianness when calculating pedit mask first bit
        net/mlx5e: Enable adding peer miss rules only if merged eswitch is supported
        net/mlx5e: CT: Fix freeing ct_label mapping
        net/mlx5e: Fix memory leak of tunnel info when rule under multipath not ready
        net/mlx5e: Use synchronize_rcu to sync with NAPI
        net/mlx5e: Use RCU to protect rq->xdp_prog
        ...
      d3017135
    • L
      Merge tag 'io_uring-5.9-2020-09-22' of git://git.kernel.dk/linux-block · 0baca070
      Linus Torvalds 提交于
      Pull io_uring fixes from Jens Axboe:
       "A few fixes - most of them regression fixes from this cycle, but also
        a few stable heading fixes, and a build fix for the included demo tool
        since some systems now actually have gettid() available"
      
      * tag 'io_uring-5.9-2020-09-22' of git://git.kernel.dk/linux-block:
        io_uring: fix openat/openat2 unified prep handling
        io_uring: mark statx/files_update/epoll_ctl as non-SQPOLL
        tools/io_uring: fix compile breakage
        io_uring: don't use retry based buffered reads for non-async bdev
        io_uring: don't re-setup vecs/iter in io_resumit_prep() is already there
        io_uring: don't run task work on an exiting task
        io_uring: drop 'ctx' ref on task work cancelation
        io_uring: grab any needed state during defer prep
      0baca070