netlink: rate-limit leftover bytes warning and print process name
authorMichal Schmidt <mschmidt@redhat.com>
Mon, 2 Jun 2014 16:25:02 +0000 (18:25 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Jun 2014 19:12:37 +0000 (15:12 -0400)
commit83880480db7b0a59c6304f9b86ae2b7024741045
tree227fd974514fe26d3a91b92013583cbb9866ef49
parent8ab02acdf274cbd6b10f7dd990f42c9b40469141
netlink: rate-limit leftover bytes warning and print process name

[ Upstream commit bfc5184b69cf9eeb286137640351c650c27f118a ]

Any process is able to send netlink messages with leftover bytes.
Make the warning rate-limited to prevent too much log spam.

The warning is supposed to help find userspace bugs, so print the
triggering command name to implicate the buggy program.

[v2: Use pr_warn_ratelimited instead of printk_ratelimited.]

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
lib/nlattr.c