1. 01 12月, 2020 1 次提交
    • P
      mptcp: implement wmem reservation · e93da928
      Paolo Abeni 提交于
      This leverages the previous commit to reserve the wmem
      required for the sendmsg() operation when the msk socket
      lock is first acquired.
      Some heuristics are used to get a reasonable [over] estimation of
      the whole memory required. If we can't forward alloc such amount
      fallback to a reasonable small chunk, otherwise enter the wait
      for memory path.
      
      When sendmsg() needs more memory it looks at wmem_reserved
      first and if that is exhausted, move more space from
      sk_forward_alloc.
      
      The reserved memory is not persistent and is released at the
      next socket unlock via the release_cb().
      
      Overall this will simplify the next patch.
      Acked-by: NFlorian Westphal <fw@strlen.de>
      Signed-off-by: NPaolo Abeni <pabeni@redhat.com>
      Reviewed-by: NMat Martineau <mathew.j.martineau@linux.intel.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      e93da928
  2. 26 11月, 2020 2 次提交
  3. 21 11月, 2020 7 次提交
  4. 20 11月, 2020 1 次提交
  5. 17 11月, 2020 11 次提交
  6. 10 11月, 2020 1 次提交
  7. 05 11月, 2020 4 次提交
  8. 30 10月, 2020 1 次提交
  9. 11 10月, 2020 1 次提交
  10. 09 10月, 2020 1 次提交
    • P
      mptcp: fix infinite loop on recvmsg()/worker() race. · d9fb8c50
      Paolo Abeni 提交于
      If recvmsg() and the workqueue race to dequeue the data
      pending on some subflow, the current mapping for such
      subflow covers several skbs and some of them have not
      reached yet the received, either the worker or recvmsg()
      can find a subflow with the data_avail flag set - since
      the current mapping is valid and in sequence - but no
      skbs in the receive queue - since the other entity just
      processed them.
      
      The above will lead to an unbounded loop in __mptcp_move_skbs()
      and a subsequent hang of any task trying to acquiring the msk
      socket lock.
      
      This change addresses the issue stopping the __mptcp_move_skbs()
      loop as soon as we detect the above race (empty receive queue
      with data_avail set).
      
      Reported-and-tested-by: syzbot+fcf8ca5817d6e92c6567@syzkaller.appspotmail.com
      Fixes: ab174ad8 ("mptcp: move ooo skbs into msk out of order queue.")
      Signed-off-by: NPaolo Abeni <pabeni@redhat.com>
      Reviewed-by: NMat Martineau <mathew.j.martineau@linux.intel.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      d9fb8c50
  11. 06 10月, 2020 1 次提交
  12. 30 9月, 2020 1 次提交
  13. 25 9月, 2020 3 次提交
  14. 18 9月, 2020 1 次提交
  15. 15 9月, 2020 4 次提交