net: report netlink extack only if set
Subsystems (2)
PATCH 1/1 net: report netlink extack only if set
From: Willem de Bruijn <[email protected]>
Initialize extack in dev_set_mtu and report only if set.
Fixes 7a4c53bee332 ("net: report invalid mtu value via netlink extack")
Reported-by syzbot <[email protected]>
Signed-off-by Willem de Bruijn <[email protected]>
--- net/core/dev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
net/core/dev.c +2 -2
@@ -7580,11 +7580,11 @@ int dev_set_mtu_ext(struct net_device *dev, int new_mtu,int dev_set_mtu (struct net_device *dev,int new_mtu) { -struct netlink_ext_ack extack; +struct netlink_ext_ack extack = {};int err; err =dev_set_mtu_ext (dev, new_mtu, &extack); -if (err) +if (err && extack._msg)net_err_ratelimited ("%s: %s\n" , dev->name, extack._msg);return err; }
Signature · 1 line
2.18.0.597.ga71716f1ad-goog
David Miller
maintainerFrom: Willem de Bruijn <[email protected]>
Date: Sun, 5 Aug 2018 15:48:01 -0400
Quoted 7 lines
From: Willem de Bruijn <[email protected]>
Initialize extack in
dev_set_mtuand report only if set.Fixes 7a4c53bee332 ("net: report invalid mtu value via netlink extack")Reported-by syzbot <[email protected]>Signed-off-by Willem de Bruijn <[email protected]>
Someone beat you to it :-) And that version is in net-next.
Thanks!
Quoted 6 lines · David Miller
From: Willem de Bruijn <[email protected]>
Date: Sun, 5 Aug 2018 15:48:01 -0400Quoted 2 lines
From: Willem de Bruijn <[email protected]>
Quoted 7 lines
Quoted 5 lines
Initialize extack in
dev_set_mtuand report only if set.Fixes 7a4c53bee332 ("net: report invalid mtu value via netlink extack")Reported-by syzbot <[email protected]>Signed-off-by Willem de Bruijn <[email protected]>Someone beat you to it :-) And that version is in net-next.
Oops. I had totally missed that thread. Glad to see it's fixed already.