# Re: \[PATCH net v3 1/7\] net/sched: act\_gate: zero-initialize netlink dump struct

- From: Paul Moses \<hidden\>
- Date: 2026-01-21 14:01:09 
- List: netdev
- Page: https://ratatoskr.run/netdev/2026/01/3380138
- Thread: https://ratatoskr.run/netdev/2026/01/3380021/t.md

```text
padding? why does fzero-init-padding-bits exist?




On Wednesday, January 21st, 2026 at 7:48 AM, Eric Dumazet [ref] wrote:

> 
> 
> On Wed, Jan 21, 2026 at 2:39 PM Paul Moses p@1g4.org wrote:
> 
> > Yes, it's not proven so you might be right, I knew it was 4 bytes at best. We can do next or toss it, I don't feel strongly either way.
> 
> 
> These bytes are cleared by C compilers.
> 
> https://en.cppreference.com/w/c/language/struct_initialization.html
> 
> Only holes might be left uninitialized.
> 
> > On Wednesday, January 21st, 2026 at 7:25 AM, Eric Dumazet edumazet@google.com wrote:
> > 
> > > On Wed, Jan 21, 2026 at 2:20 PM Paul Moses p@1g4.org wrote:
> > > 
> > > > Zero-initialize the dump struct before selective assignment to avoid
> > > > leaking stack padding in netlink replies. This matches other actions
> > > > (e.g. act_connmark) that zero-init their dump structs.
> > > > 
> > > > Fixes: a51c328df310 ("net: qos: introduce a gate control flow action")
> > > > Cc: <redacted>
> > > > Signed-off-by: Paul Moses <redacted>
> > > > ---
> > > 
> > > I do not see a bug to fix, current code is fine.
> > > 
> > > act_connmark problem was that "struct tc_connmark" had a 16bit hole.
> > > 
> > > No such issue for struct tc_gate.
```
