Re: [PATCH v2 net] l2tp: fix tunnel and session refcount leak on seq_file release

Eric Dumazet <[email protected]>
Newsgroups org.kernel.vger.netdev
Message-ID <CANn89i+Y5hiD=-ifXroaZ=f8U68NbSW=b6MeWQG472iSDBC3Tg@mail.gmail.com>
On Tue, Aug 11, 2026 at 12:20 PM Paolo Abeni <[email protected]> wrote:
>
> On 8/10/26 4:11 PM, Eric Dumazet wrote:
> > @@ -1608,8 +1655,8 @@ static __net_init int pppol2tp_init_net(struct net *net)
> >       struct proc_dir_entry *pde;
> >       int err = 0;
> >
> > -     pde = proc_create_net("pppol2tp", 0444, net->proc_net,
> > -                           &pppol2tp_seq_ops, sizeof(struct pppol2tp_seq_data));
> > +     pde = proc_create_data("pppol2tp", 0444, net->proc_net,
> > +                            &pppol2tp_proc_ops, net);
>
> It looks like the above does not build with CONFIG_PROC_FS=n:
>
> net/l2tp/l2tp_ppp.c: In function ‘pppol2tp_init_net’:
> net/l2tp/l2tp_ppp.c:1659:33: error: ‘pppol2tp_proc_ops’ undeclared (first use in this function); did you mean ‘pppol2tp_chan_ops’?
>  1659 |                                &pppol2tp_proc_ops, net);
>       |                                 ^~~~~~~~~~~~~~~~~
>       |                                 pppol2tp_chan_ops
>

For some reason, proc_create_net() is a NOP for CONFIG_PROC_FS=n, but
proc_create_data() is not.

Oh well.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.