rtnetlink: fix rtnl_calcit() and rtnl_dump_ifinfo()
authorEric Dumazet <eric.dumazet@gmail.com>
Fri, 4 Jan 2013 00:34:22 +0000 (00:34 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Jan 2013 16:43:58 +0000 (08:43 -0800)
commitb18401af7f51cddd5d2e03c9b800ba7dd60f18a0
tree5a2e55eb2860e472e1ea82445418f83bf6cb2942
parenta0d3aa1f04a7430fc80f6f1a7aaaaf495da8d8e1
rtnetlink: fix rtnl_calcit() and rtnl_dump_ifinfo()

commit a4b64fbe482c7766f7925f03067fc637716bfa3f upstream.

nlmsg_parse() might return an error, so test its return value before
potential random memory accesses.

Errors introduced in commit 115c9b81928 (rtnetlink: Fix problem with
buffer allocation)

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/core/rtnetlink.c