linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Ratelimit SO_BSDCOMPAT warnings
@ 2003-08-18 22:06 Phil Oester
  2003-08-18 22:15 ` Valdis.Kletnieks
  0 siblings, 1 reply; 7+ messages in thread
From: Phil Oester @ 2003-08-18 22:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-net

Back in March, there was some discussion about ratelimiting the
BSDCOMPAT errors, and James Morris provided a patch to achieve
this.

http://www.ussg.iu.edu/hypermail/linux/kernel/0303.3/1078.html

To which David Miller stated the patch had been applied.

http://www.ussg.iu.edu/hypermail/linux/kernel/0303.3/1081.html

Unfortunately, it seems to have fallen through the cracks.  Below
is the patch again, updated for 2.6.0-test3 - please apply.

Phil Oester

--- linux-2.6.0-test3-orig/net/core/sock.c      Sat Aug  9 00:38:59 2003
+++ linux-2.6.0-test3/net/core/sock.c   Mon Aug 18 18:01:15 2003
@@ -153,8 +153,13 @@
 
 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;
+
+       if (!warned) {
+               warned = 1;
+               printk(KERN_WARNING "process `%s' is using obsolete "
+                      "%s SO_BSDCOMPAT\n", current->comm, name);
+       }
 }
 
 /*


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2003-08-19 14:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-18 22:06 [PATCH] Ratelimit SO_BSDCOMPAT warnings Phil Oester
2003-08-18 22:15 ` Valdis.Kletnieks
2003-08-18 22:48   ` David S. Miller
2003-08-19  0:36     ` Jamie Lokier
2003-08-19  1:05       ` Jamie Lokier
2003-08-19 14:32         ` Phil Oester
2003-08-19  0:37   ` James Morris

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).