linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2.4] IrDA kernel log buster
@ 2003-12-11 23:51 Jean Tourrilhes
  2003-12-13 14:54 ` Marcelo Tosatti
  0 siblings, 1 reply; 2+ messages in thread
From: Jean Tourrilhes @ 2003-12-11 23:51 UTC (permalink / raw)
  To: Marcelo Tosatti, Jeff Garzik, Linux kernel mailing list

	Hi Marcelo,

	I just ran 2.4.23, and after a few min the disk reached 100%
capacity. A quick check lead to to oversized kernel log, and to the
following changeset :

http://linux.bkbits.net:8080/linux-2.4/cset@1.1136.23.2?nav=index.html|ChangeSet@-12w

	Patch to fix this problem is attached below, I've just
backported the proper fixes from 2.5.X into 2.4.X.
	Probably this person did too much Python, but in C you need
braces around multiple statements part of the same branch, so the
second printf was always executed even when logging was disabled. I
also don't understand why this person didn't decided to backport the
2.5.X fix.
	I'm also bit surprised that this kind of patch went into the
kernel behind my back, because I though that freeze meant not
accepting untested patch from random hacker.

	Have fun...

	Jean

-------------------------------------------------

diff -u -p linux/net/irda/irnet/irnet.j1.h linux/net/irda/irnet/irnet.h
--- linux/net/irda/irnet/irnet.j1.h	Thu Dec 11 15:31:32 2003
+++ linux/net/irda/irnet/irnet.h	Thu Dec 11 15:34:08 2003
@@ -322,29 +322,29 @@
  * compiler will optimise away the if() in all cases.
  */
 /* All error messages (will show up in the normal logs) */
-#define DERROR(dbg, args...) \
+#define DERROR(dbg, format, args...) \
 	{if(DEBUG_##dbg) \
-		printk(KERN_INFO "irnet: %s(): ", __FUNCTION__); printk(args);}
+		printk(KERN_INFO "irnet: %s(): " format, __FUNCTION__ , ##args);}
 
 /* Normal debug message (will show up in /var/log/debug) */
-#define DEBUG(dbg, args...) \
+#define DEBUG(dbg, format, args...) \
 	{if(DEBUG_##dbg) \
-		printk(KERN_DEBUG "irnet: %s(): ", __FUNCTION__); printk(args);}
+		printk(KERN_DEBUG "irnet: %s(): " format, __FUNCTION__ , ##args);}
 
 /* Entering a function (trace) */
-#define DENTER(dbg, args...) \
+#define DENTER(dbg, format, args...) \
 	{if(DEBUG_##dbg) \
-	printk(KERN_DEBUG "irnet: ->%s", __FUNCTION__); printk(args);}
+		printk(KERN_DEBUG "irnet: -> %s" format, __FUNCTION__ , ##args);}
 
 /* Entering and exiting a function in one go (trace) */
-#define DPASS(dbg, args...) \
+#define DPASS(dbg, format, args...) \
 	{if(DEBUG_##dbg) \
-		printk(KERN_DEBUG "irnet: <>%s", __FUNCTION__); printk(args);}
+		printk(KERN_DEBUG "irnet: <>%s" format, __FUNCTION__ , ##args);}
 
 /* Exiting a function (trace) */
-#define DEXIT(dbg, args...) \
+#define DEXIT(dbg, format, args...) \
 	{if(DEBUG_##dbg) \
-		printk(KERN_DEBUG "irnet: <-%s()", __FUNCTION__); printk(args);}
+		printk(KERN_DEBUG "irnet: <-%s()" format, __FUNCTION__ , ##args);}
 
 /* Exit a function with debug */
 #define DRETURN(ret, dbg, args...) \

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

* Re: [PATCH 2.4] IrDA kernel log buster
  2003-12-11 23:51 [PATCH 2.4] IrDA kernel log buster Jean Tourrilhes
@ 2003-12-13 14:54 ` Marcelo Tosatti
  0 siblings, 0 replies; 2+ messages in thread
From: Marcelo Tosatti @ 2003-12-13 14:54 UTC (permalink / raw)
  To: jt; +Cc: Marcelo Tosatti, Jeff Garzik, Linux kernel mailing list



On Thu, 11 Dec 2003, Jean Tourrilhes wrote:

> 	Hi Marcelo,
> 
> 	I just ran 2.4.23, and after a few min the disk reached 100%
> capacity. A quick check lead to to oversized kernel log, and to the
> following changeset :
> 
> http://linux.bkbits.net:8080/linux-2.4/cset@1.1136.23.2?nav=index.html|ChangeSet@-12w
> 
> 	Patch to fix this problem is attached below, I've just
> backported the proper fixes from 2.5.X into 2.4.X.
> 	Probably this person did too much Python, but in C you need
> braces around multiple statements part of the same branch, so the
> second printf was always executed even when logging was disabled. I
> also don't understand why this person didn't decided to backport the
> 2.5.X fix.
> 	I'm also bit surprised that this kind of patch went into the
> kernel behind my back, because I though that freeze meant not
> accepting untested patch from random hacker.

Indeed accepting the patch was a mistake. 

Fix applied.



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

end of thread, other threads:[~2003-12-13 14:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-11 23:51 [PATCH 2.4] IrDA kernel log buster Jean Tourrilhes
2003-12-13 14:54 ` Marcelo Tosatti

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).