Re: [PATCH net] net: Unpublish sk from sk_reuseport_cb before call_rcu

2019-09-30 Thread David Miller
From: Martin KaFai Lau Date: Fri, 27 Sep 2019 16:00:31 -0700 > The "reuse->sock[]" array is shared by multiple sockets. The going away > sk must unpublish itself from "reuse->sock[]" before making call_rcu() > call. However, this unpublish-action is currently done after a grace > period and it

[PATCH net] net: Unpublish sk from sk_reuseport_cb before call_rcu

2019-09-27 Thread Martin KaFai Lau
The "reuse->sock[]" array is shared by multiple sockets. The going away sk must unpublish itself from "reuse->sock[]" before making call_rcu() call. However, this unpublish-action is currently done after a grace period and it may cause use-after-free. The fix is to move reuseport_detach_sock() t