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:15:38 +0000 (15:15 -0400)
commit1ab214eb6e840d3a4a1165a6978cff2448f97739
tree79f81a3cded49e27b84e6855a8f0dfde4b9e042f
parenta81347b883e3150b0cbabdb1a8e6c5d5120f80fb
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