]> git.baikalelectronics.ru Git - kernel.git/commit
ethtool: count header size in reply size estimate
authorMichal Kubecek <mkubecek@suse.cz>
Sun, 10 May 2020 19:04:09 +0000 (21:04 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 May 2020 23:59:19 +0000 (16:59 -0700)
commit431e2ce48357de8eb15c9f19cdbc54591c6b6f98
tree6fb9d504829a14148eecfa46671c2e093deff951
parent6454fdb3ce4a4565c6ab089fa21a51a895dca19a
ethtool: count header size in reply size estimate

As ethnl_request_ops::reply_size handlers do not include common header
size into calculated/estimated reply size, it needs to be added in
ethnl_default_doit() and ethnl_default_notify() before allocating the
message. On the other hand, strset_reply_size() should not add common
header size.

Fixes: e9533c9ca90b ("ethtool: default handlers for GET requests")
Reported-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ethtool/netlink.c
net/ethtool/strset.c