Commit 82a3242e11d9e63c8195be46c954efaefee35e22
1 parent
a236c71766
Exists in
master
and in
7 other branches
sysfs: remove "last sysfs file:" line from the oops messages
On some arches (x86, sh, arm, unicore, powerpc) the oops message would print out the last sysfs file accessed. This was very useful in finding a number of sysfs and driver core bugs in the 2.5 and early 2.6 development days, but it has been a number of years since this file has actually helped in debugging anything that couldn't also be trivially determined from the stack traceback. So it's time to delete the line. This is good as we need all the space we can get for oops messages at times on consoles. Acked-by: Phil Carmody <ext-phil.2.carmody@nokia.com> Acked-by: Ingo Molnar <mingo@elte.hu> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Showing 7 changed files with 0 additions and 22 deletions Side-by-side Diff
arch/arm/kernel/traps.c
... | ... | @@ -234,7 +234,6 @@ |
234 | 234 | |
235 | 235 | printk(KERN_EMERG "Internal error: %s: %x [#%d]" S_PREEMPT S_SMP "\n", |
236 | 236 | str, err, ++die_counter); |
237 | - sysfs_printk_last_file(); | |
238 | 237 | |
239 | 238 | /* trap and error numbers are mostly meaningless on ARM */ |
240 | 239 | ret = notify_die(DIE_OOPS, str, regs, err, tsk->thread.trap_no, SIGSEGV); |
arch/powerpc/kernel/traps.c
arch/sh/kernel/traps_32.c
arch/unicore32/kernel/traps.c
... | ... | @@ -192,7 +192,6 @@ |
192 | 192 | |
193 | 193 | printk(KERN_EMERG "Internal error: %s: %x [#%d]\n", |
194 | 194 | str, err, ++die_counter); |
195 | - sysfs_printk_last_file(); | |
196 | 195 | |
197 | 196 | /* trap and error numbers are mostly meaningless on UniCore */ |
198 | 197 | ret = notify_die(DIE_OOPS, str, regs, err, tsk->thread.trap_no, \ |
arch/x86/kernel/dumpstack.c
fs/sysfs/file.c
... | ... | @@ -24,13 +24,6 @@ |
24 | 24 | |
25 | 25 | #include "sysfs.h" |
26 | 26 | |
27 | -/* used in crash dumps to help with debugging */ | |
28 | -static char last_sysfs_file[PATH_MAX]; | |
29 | -void sysfs_printk_last_file(void) | |
30 | -{ | |
31 | - printk(KERN_EMERG "last sysfs file: %s\n", last_sysfs_file); | |
32 | -} | |
33 | - | |
34 | 27 | /* |
35 | 28 | * There's one sysfs_buffer for each open file and one |
36 | 29 | * sysfs_open_dirent for each sysfs_dirent with one or more open |
... | ... | @@ -337,11 +330,6 @@ |
337 | 330 | struct sysfs_buffer *buffer; |
338 | 331 | const struct sysfs_ops *ops; |
339 | 332 | int error = -EACCES; |
340 | - char *p; | |
341 | - | |
342 | - p = d_path(&file->f_path, last_sysfs_file, sizeof(last_sysfs_file)); | |
343 | - if (!IS_ERR(p)) | |
344 | - memmove(last_sysfs_file, p, strlen(p) + 1); | |
345 | 333 | |
346 | 334 | /* need attr_sd for attr and ops, its parent for kobj */ |
347 | 335 | if (!sysfs_get_active(attr_sd)) |
include/linux/sysfs.h
... | ... | @@ -176,7 +176,6 @@ |
176 | 176 | const unsigned char *name); |
177 | 177 | struct sysfs_dirent *sysfs_get(struct sysfs_dirent *sd); |
178 | 178 | void sysfs_put(struct sysfs_dirent *sd); |
179 | -void sysfs_printk_last_file(void); | |
180 | 179 | |
181 | 180 | /* Called to clear a ns tag when it is no longer valid */ |
182 | 181 | void sysfs_exit_ns(enum kobj_ns_type type, const void *tag); |
... | ... | @@ -346,10 +345,6 @@ |
346 | 345 | static inline int __must_check sysfs_init(void) |
347 | 346 | { |
348 | 347 | return 0; |
349 | -} | |
350 | - | |
351 | -static inline void sysfs_printk_last_file(void) | |
352 | -{ | |
353 | 348 | } |
354 | 349 | |
355 | 350 | #endif /* CONFIG_SYSFS */ |