1. 14 Aug, 2020 33 commits
  2. 13 Aug, 2020 7 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