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