* [PATCH net-next] net: report netlink extack only if set
@ 2018-08-05 19:48 Willem de Bruijn
2018-08-06 0:37 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Willem de Bruijn @ 2018-08-05 19:48 UTC (permalink / raw)
To: netdev; +Cc: davem, stephen, Willem de Bruijn
From: Willem de Bruijn <willemb@google.com>
Initialize extack in dev_set_mtu and report only if set.
Fixes: 7a4c53bee332 ("net: report invalid mtu value via netlink extack")
Reported-by: syzbot <syzkaller@googlegroups.com>
Signed-off-by: Willem de Bruijn <willemb@google.com>
---
net/core/dev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index 36e994519488e..1d0122a766019 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -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;
}
--
2.18.0.597.ga71716f1ad-goog
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH net-next] net: report netlink extack only if set
2018-08-05 19:48 [PATCH net-next] net: report netlink extack only if set Willem de Bruijn
@ 2018-08-06 0:37 ` David Miller
2018-08-06 1:40 ` Willem de Bruijn
0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2018-08-06 0:37 UTC (permalink / raw)
To: willemdebruijn.kernel; +Cc: netdev, stephen, willemb
From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Date: Sun, 5 Aug 2018 15:48:01 -0400
> From: Willem de Bruijn <willemb@google.com>
>
> Initialize extack in dev_set_mtu and report only if set.
>
> Fixes: 7a4c53bee332 ("net: report invalid mtu value via netlink extack")
> Reported-by: syzbot <syzkaller@googlegroups.com>
> Signed-off-by: Willem de Bruijn <willemb@google.com>
Someone beat you to it :-) And that version is in net-next.
Thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH net-next] net: report netlink extack only if set
2018-08-06 0:37 ` David Miller
@ 2018-08-06 1:40 ` Willem de Bruijn
0 siblings, 0 replies; 3+ messages in thread
From: Willem de Bruijn @ 2018-08-06 1:40 UTC (permalink / raw)
To: David Miller; +Cc: Network Development, Stephen Hemminger, Willem de Bruijn
On Sun, Aug 5, 2018 at 8:37 PM David Miller <davem@davemloft.net> wrote:
>
> From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
> Date: Sun, 5 Aug 2018 15:48:01 -0400
>
> > From: Willem de Bruijn <willemb@google.com>
> >
> > Initialize extack in dev_set_mtu and report only if set.
> >
> > Fixes: 7a4c53bee332 ("net: report invalid mtu value via netlink extack")
> > Reported-by: syzbot <syzkaller@googlegroups.com>
> > Signed-off-by: Willem de Bruijn <willemb@google.com>
>
> 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.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-08-06 3:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-05 19:48 [PATCH net-next] net: report netlink extack only if set Willem de Bruijn
2018-08-06 0:37 ` David Miller
2018-08-06 1:40 ` Willem de Bruijn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox