lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMB2axP9PZOPjKMfod40bo=t==vjCG0TvJj5SW67X69K-gSiww@mail.gmail.com>
Date: Tue, 29 Apr 2025 10:37:02 -0700
From: Amery Hung <ameryhung@...il.com>
To: Martin KaFai Lau <martin.lau@...ux.dev>
Cc: bpf@...r.kernel.org, netdev@...r.kernel.org, alexei.starovoitov@...il.com, 
	andrii@...nel.org, daniel@...earbox.net, martin.lau@...nel.org, 
	xiyou.wangcong@...il.com, kernel-team@...a.com
Subject: Re: [PATCH bpf-next/net] bpf: net_sched: Fix using bpf qdisc as
 default qdisc

On Tue, Apr 29, 2025 at 10:30 AM Martin KaFai Lau <martin.lau@...ux.dev> wrote:
>
> On 4/22/25 3:58 PM, Amery Hung wrote:
> > diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
> > index db6330258dda..1cda7e7feb32 100644
> > --- a/net/sched/sch_api.c
> > +++ b/net/sched/sch_api.c
> > @@ -208,7 +208,7 @@ static struct Qdisc_ops *qdisc_lookup_default(const char *name)
> >
> >       for (q = qdisc_base; q; q = q->next) {
> >               if (!strcmp(name, q->id)) {
> > -                     if (!try_module_get(q->owner))
> > +                     if (!bpf_try_module_get(q, q->owner))
> >                               q = NULL;
> >                       break;
> >               }
> > @@ -238,7 +238,7 @@ int qdisc_set_default(const char *name)
> >
> >       if (ops) {
> >               /* Set new default */
> > -             module_put(default_qdisc_ops->owner);
> > +             bpf_module_put(ops, default_qdisc_ops->owner);
>
> The first arg, should it be the "default_qdisc_ops" instead?
>

You are right. I will fix this sloppy mistake and resend.

Thanks,
Amery

>
> >               default_qdisc_ops = ops;
> >       }
> >       write_unlock(&qdisc_mod_lock);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ