Skip to contentSkip to conversation

kernel: use KSYM_NAME_LEN

PATCH Applied Cyrill Gorcunov 1 participant 1 message Jan 23, 2008 kprobes

lore
Share & tools
lore
#0 lore raw

PATCH 3/6 kernel: use KSYM_NAME_LEN

Use KSYM_NAME_LEN instead of numeric value

---

kernel/kprobes.c +1 -1
Index: linux-2.6.git/kernel/kprobes.c
===================================================================
@@ -872,7 +872,7 @@ static int __kprobes show_kprobe_addr(st
 	const char *sym = NULL;
 	unsigned int i = *(loff_t *) v;
 	unsigned long offset = 0;
-	char *modname, namebuf[128];
+	char *modname, namebuf[KSYM_NAME_LEN];
 
 	head = &kprobe_table[i];
 	preempt_disable();
kernel/lockdep_proc.c +1 -1
Index: linux-2.6.git/kernel/lockdep_proc.c
===================================================================
@@ -93,7 +93,7 @@ static unsigned long count_backward_deps
 
 static void print_name(struct seq_file *m, struct lock_class *class)
 {
-	char str[128];
+	char str[KSYM_NAME_LEN];
 	const char *name = class->name;
 
 	if (!name) {