Commit 1c5d4fe5 authored by Andi Kleen's avatar Andi Kleen Committed by David S. Miller

[NET]: Limit SO_BSDCOMPAT warning.

parent 16e02cd4
......@@ -154,8 +154,14 @@ static int sock_set_timeout(long *timeo_p, char __user *optval, int optlen)
static void sock_warn_obsolete_bsdism(const char *name)
{
printk(KERN_WARNING "process `%s' is using obsolete "
"%s SO_BSDCOMPAT\n", current->comm, name);
static int warned;
static char warncomm[16];
if (strcmp(warncomm, current->comm) && warned < 5) {
strcpy(warncomm, current->comm);
printk(KERN_WARNING "process `%s' is using obsolete "
"%s SO_BSDCOMPAT\n", warncomm, name);
warned++;
}
}
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment