Skip to content
  1. Oct 31, 2017
    • Cong Wang's avatar
      net_sched: remove tcf_block_put_deferred() · 822e86d9
      Cong Wang authored
      In commit 7aa0045d ("net_sched: introduce a workqueue for RCU callbacks of tc filter")
      I defer tcf_chain_flush() to a workqueue, this causes a use-after-free
      because qdisc is already destroyed after we queue this work.
      
      The tcf_block_put_deferred() is no longer necessary after we get RTNL
      for each tc filter destroy work, no others could jump in at this point.
      Same for tcf_chain_hold(), we are fully serialized now.
      
      This also reduces one indirection therefore makes the code more
      readable. Note this brings back a rcu_barrier(), however comparing
      to the code prior to commit 7aa0045d we still reduced one
      rcu_barrier(). For net-next, we can consider to refcnt tcf block to
      avoid it.
      
      Fixes: 7aa0045d
      
       ("net_sched: introduce a workqueue for RCU callbacks of tc filter")
      Cc: Daniel Borkmann <daniel@iogearbox.net>
      Cc: Jiri Pirko <jiri@resnulli.us>
      Cc: John Fastabend <john.fastabend@gmail.com>
      Cc: Jamal Hadi Salim <jhs@mojatatu.com>
      Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
      Cc: Eric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      822e86d9
    • Guillaume Nault's avatar
      l2tp: hold tunnel in pppol2tp_connect() · f9e56baf
      Guillaume Nault authored
      Use l2tp_tunnel_get() in pppol2tp_connect() to ensure the tunnel isn't
      going to disappear while processing the rest of the function.
      
      Fixes: fd558d18
      
       ("l2tp: Split pppol2tp patch into separate l2tp and ppp parts")
      Signed-off-by: default avatarGuillaume Nault <g.nault@alphalink.fr>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f9e56baf
  2. Oct 30, 2017
  3. Oct 29, 2017
  4. Oct 28, 2017