aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorTom Zanussi <zanussi@us.ibm.com>2005-12-20 14:10:22 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-12-20 20:33:22 -0500
commitfd30fc3256824f03c2ff9317269d66f72f7042ca (patch)
tree863a1ba4ddae961e2727343c17d15f64c3f4d463 /include/linux
parentbb44f116a14c4c932f15c79acfafd46bcb43ca9a (diff)
[PATCH] relayfs: remove warning printk() in relay_switch_subbuf()
There's currently a diagnostic printk in relay_switch_subbuf() meant as a warning if you accidentally try to log an event larger than the sub-buffer size. The problem is if this happens while logging from somewhere it's not safe to be doing printks, such as in the scheduler, you can end up with a deadlock. This patch removes the warning from relay_switch_subbuf() and instead prints some diagnostic info when the channel is closed. Thanks to Mathieu Desnoyers for pointing out the problem and suggesting a fix. Signed-off-by: Tom Zanussi <zanussi@us.ibm.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/relayfs_fs.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/relayfs_fs.h b/include/linux/relayfs_fs.h
index cfafc3e76bc2..fb7e80737325 100644
--- a/include/linux/relayfs_fs.h
+++ b/include/linux/relayfs_fs.h
@@ -20,9 +20,9 @@
20#include <linux/kref.h> 20#include <linux/kref.h>
21 21
22/* 22/*
23 * Tracks changes to rchan_buf struct 23 * Tracks changes to rchan/rchan_buf structs
24 */ 24 */
25#define RELAYFS_CHANNEL_VERSION 5 25#define RELAYFS_CHANNEL_VERSION 6
26 26
27/* 27/*
28 * Per-cpu relay channel buffer 28 * Per-cpu relay channel buffer
@@ -60,6 +60,7 @@ struct rchan
60 struct rchan_callbacks *cb; /* client callbacks */ 60 struct rchan_callbacks *cb; /* client callbacks */
61 struct kref kref; /* channel refcount */ 61 struct kref kref; /* channel refcount */
62 void *private_data; /* for user-defined data */ 62 void *private_data; /* for user-defined data */
63 size_t last_toobig; /* tried to log event > subbuf size */
63 struct rchan_buf *buf[NR_CPUS]; /* per-cpu channel buffers */ 64 struct rchan_buf *buf[NR_CPUS]; /* per-cpu channel buffers */
64}; 65};
65 66