From: Thomas Graf Date: Thu, 11 Nov 2010 15:47:59 +0000 (+0000) Subject: rtnetlink: Fix message size calculation for link messages X-Git-Tag: v2.6.37-rc2~20^2~22 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=369cf77a6a3e41b1110506ddf43d45804103bfde;p=pandora-kernel.git rtnetlink: Fix message size calculation for link messages nlmsg_total_size() calculates the length of a netlink message including header and alignment. nla_total_size() calculates the space an individual attribute consumes which was meant to be used in this context. Also, ensure to account for the attribute header for the IFLA_INFO_XSTATS attribute as implementations of get_xstats_size() seem to assume that we do so. The addition of two message headers minus the missing attribute header resulted in a calculated message size that was larger than required. Therefore we never risked running out of skb tailroom. Signed-off-by: Thomas Graf Acked-by: Patrick McHardy Signed-off-by: David S. Miller --- Reading git-diff-tree failed