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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89iLdM=a=oagYA=LKbfaDuhQaYtxA0wNERuzNLGghA58Phw@mail.gmail.com>
Date: Wed, 14 Jan 2026 08:58:22 +0100
From: Eric Dumazet <edumazet@...gle.com>
To: Toke Høiland-Jørgensen <toke@...hat.com>
Cc: Toke Høiland-Jørgensen <toke@...e.dk>, 
	Jamal Hadi Salim <jhs@...atatu.com>, Cong Wang <xiyou.wangcong@...il.com>, 
	Jiri Pirko <jiri@...nulli.us>, Paolo Abeni <pabeni@...hat.com>, 
	"David S. Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>, Simon Horman <horms@...nel.org>, 
	cake@...ts.bufferbloat.net, netdev@...r.kernel.org
Subject: Re: [PATCH net-next] net/sched: cake: avoid separate allocation of
 struct cake_sched_config

On Tue, Jan 13, 2026 at 3:32 PM Toke Høiland-Jørgensen <toke@...hat.com> wrote:
>
> Paolo pointed out that we can avoid separately allocating struct
> cake_sched_config even in the non-mq case, by embedding it into struct
> cake_sched_data. This reduces the complexity of the logic that swaps the
> pointers and frees the old value, at the cost of adding 56 bytes to the
> latter. Since cake_sched_data is already almost 17k bytes, this seems
> like a reasonable tradeoff.
>
> Suggested-by: Paolo Abeni <pabeni@...hat.com>
> Signed-off-by: Toke Høiland-Jørgensen <toke@...hat.com>
> ---

This is also fixing a panic, so :

Fixes: bc0ce2bad36c ("net/sched: sch_cake: Factor out config variables
into separate struct")

For the record, a fix for the panic would be :

diff --git a/net/sched/sch_cake.c b/net/sched/sch_cake.c
index e30ef7f8ee6862a916acc06e568e37f35fd675b1..742fb850e2afb159f215b263bc36c372552911bc
100644
--- a/net/sched/sch_cake.c
+++ b/net/sched/sch_cake.c
@@ -2825,6 +2825,8 @@ static int cake_init(struct Qdisc *sch, struct
nlattr *opt,
        struct cake_sched_config *q;
        int i, j, err;

+       qdisc_watchdog_init(&qd->watchdog, sch);
+
        q = kzalloc(sizeof(*q), GFP_KERNEL);
        if (!q)
                return -ENOMEM;
@@ -2838,7 +2840,6 @@ static int cake_init(struct Qdisc *sch, struct
nlattr *opt,
        qd->cur_flow  = 0;
        qd->config = q;

-       qdisc_watchdog_init(&qd->watchdog, sch);

        if (opt) {
                err = cake_change(sch, opt, extack);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ