On Fri, Aug 12, 2022 at 11:54:43 +0200, Jakub Sitnicki wrote: > On Thu, Aug 11, 2022 at 10:23 AM -07, Jakub Kicinski wrote: > > On Wed, 10 Aug 2022 12:28:48 +0200 Jakub Sitnicki wrote: > >> Fixes: fd558d186df2 ("l2tp: Split pppol2tp patch into separate l2tp and ppp parts") > > > > That tag immediately sets off red flags. Please find the commit where > > to code originates, not where it was last moved. > > The code move happened in v2.6.35. There's no point in digging further, IMHO. At the time of fd558d186df2, sk_user_data was checked/set by the newly added function l2tp_tunnel_create. The only callpath for l2tp_tunnel_create was via. pppol2tp_connect which called l2tp_tunnel_create with lock_sock held (and indeed still does). I think the addition of the netlink API (which added a new callpath for l2tp_tunnel_create via. l2tp_nl_cmd_tunnel_create which was *not* lock_sock-protected) is perhaps the right commit to point to? 309795f4bec2 ("l2tp: Add netlink control API for L2TP")