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: 728480f124
("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>
This commit is contained in:

committed by
David S. Miller

parent
d69100b8ee
commit
7c87e32d2e
@@ -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];
|
||||
|
||||
|
Reference in New Issue
Block a user