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: <willemdebruijn.kernel.c89a9fd4ffe8@gmail.com>
Date: Wed, 07 Jan 2026 09:42:28 -0500
From: Willem de Bruijn <willemdebruijn.kernel@...il.com>
To: Toke Høiland-Jørgensen <toke@...e.dk>, 
 Willem de Bruijn <willemdebruijn.kernel@...il.com>, 
 Jamal Hadi Salim <jhs@...atatu.com>, 
 Cong Wang <xiyou.wangcong@...il.com>, 
 Jiri Pirko <jiri@...nulli.us>, 
 "David S. Miller" <davem@...emloft.net>, 
 Eric Dumazet <edumazet@...gle.com>, 
 Jakub Kicinski <kuba@...nel.org>, 
 Paolo Abeni <pabeni@...hat.com>, 
 Simon Horman <horms@...nel.org>
Cc: Jonas Köppeler <j.koeppeler@...berlin.de>, 
 cake@...ts.bufferbloat.net, 
 netdev@...r.kernel.org
Subject: Re: [PATCH net-next v6 2/6] net/sched: sch_cake: Factor out config
 variables into separate struct

Toke Høiland-Jørgensen wrote:
> Willem de Bruijn <willemdebruijn.kernel@...il.com> writes:
> 
> >>  static int cake_init(struct Qdisc *sch, struct nlattr *opt,
> >>  		     struct netlink_ext_ack *extack)
> >>  {
> >> -	struct cake_sched_data *q = qdisc_priv(sch);
> >> +	struct cake_sched_data *qd = qdisc_priv(sch);
> >> +	struct cake_sched_config *q;
> >>  	int i, j, err;
> >>  
> >> +	q = kvcalloc(1, sizeof(struct cake_sched_config), GFP_KERNEL);
> >> +	if (!q)
> >> +		return -ENOMEM;
> >> +
> >
> > Can this just be a regular kzalloc?
> 
> Yeah, I guess so. I'll change this if there's a need to respin for other
> reasons, but probably not worth respinning for this on its own? Seeing
> as it'll all end up in the same kmalloc call anyway :)

Sounds good.

> 
> > More importantly, where is q assigned to qd->config after init?
> 
> Just below:
> 
> >>  	sch->limit = 10240;
> >>  	sch->flags |= TCQ_F_DEQUEUE_DROPS;
> >>  
> >> @@ -2742,33 +2755,36 @@ static int cake_init(struct Qdisc *sch, struct nlattr *opt,
> >>  			       * for 5 to 10% of interval
> >>  			       */
> >>  	q->rate_flags |= CAKE_FLAG_SPLIT_GSO;
> >> -	q->cur_tin = 0;
> >> -	q->cur_flow  = 0;
> >> +	qd->cur_tin = 0;
> >> +	qd->cur_flow  = 0;
> >> +	qd->config = q;
> 
> Here:   ^^^^^^^

I'm blind. Thanks!

Reviewed-by: Willem de Bruijn <willemb@...gle.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ