netlink: Fix nla_parse_nested_compat() to call nla_parse() directly
authorThomas Graf <tgraf@suug.ch>
Thu, 22 May 2008 17:48:59 +0000 (10:48 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 16 Jun 2008 20:19:56 +0000 (13:19 -0700)
commitf118d52421c0f803b89fb42dc6448cacbafbd8ee
tree5a60a7893c7c31074efbb9a17542aa164293d985
parent28cdf87938f6d470098c85d4f1694276dc85958d
netlink: Fix nla_parse_nested_compat() to call nla_parse() directly

[ upstream commit: b9a2f2e450b0f770bb4347ae8d48eb2dea701e24 ]

The purpose of nla_parse_nested_compat() is to parse attributes which
contain a struct followed by a stream of nested attributes.  So far,
it called nla_parse_nested() to parse the stream of nested attributes
which was wrong, as nla_parse_nested() expects a container attribute
as data which holds the attribute stream.  It needs to call
nla_parse() directly while pointing at the next possible alignment
point after the struct in the beginning of the attribute.

With this patch, I can no longer reproduce the reported leftover
warnings.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Acked-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
include/net/netlink.h