summaryrefslogtreecommitdiffstats
path: root/net/ethtool/strset.c
diff options
context:
space:
mode:
authorMichal Kubecek <mkubecek@suse.cz>2020-05-10 21:04:09 +0200
committerDavid S. Miller <davem@davemloft.net>2020-05-21 16:59:19 -0700
commit7c87e32d2e380228ada79d20ac5b7674718ef097 (patch)
tree6fb9d504829a14148eecfa46671c2e093deff951 /net/ethtool/strset.c
parentd69100b8eee27c2d60ee52df76e0b80a8d492d34 (diff)
downloadlinux-stable-7c87e32d2e380228ada79d20ac5b7674718ef097.tar.gz
linux-stable-7c87e32d2e380228ada79d20ac5b7674718ef097.tar.bz2
linux-stable-7c87e32d2e380228ada79d20ac5b7674718ef097.zip
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: 728480f12442 ("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>
Diffstat (limited to 'net/ethtool/strset.c')
-rw-r--r--net/ethtool/strset.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/net/ethtool/strset.c b/net/ethtool/strset.c
index 95eae5c68a52..0eed4e4909ab 100644
--- a/net/ethtool/strset.c
+++ b/net/ethtool/strset.c
@@ -324,7 +324,6 @@ static int strset_reply_size(const struct ethnl_req_info *req_base,
int len = 0;
int ret;
- len += ethnl_reply_header_size();
for (i = 0; i < ETH_SS_COUNT; i++) {
const struct strset_info *set_info = &data->sets[i];