mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-05 05:42:36 +00:00
sysfs: crash debugging
Print the name of the last-accessed sysfs file when we oops, to help track down oopses which occur in sysfs store/read handlers. Because these oopses tend to not leave any trace of the offending code in the stack traces. Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
e94320939f
commit
ae87221d3c
4 changed files with 23 additions and 0 deletions
|
@ -119,6 +119,8 @@ void sysfs_remove_file_from_group(struct kobject *kobj,
|
|||
|
||||
void sysfs_notify(struct kobject *kobj, char *dir, char *attr);
|
||||
|
||||
void sysfs_printk_last_file(void);
|
||||
|
||||
extern int __must_check sysfs_init(void);
|
||||
|
||||
#else /* CONFIG_SYSFS */
|
||||
|
@ -231,6 +233,10 @@ static inline int __must_check sysfs_init(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static inline void sysfs_printk_last_file(void)
|
||||
{
|
||||
}
|
||||
|
||||
#endif /* CONFIG_SYSFS */
|
||||
|
||||
#endif /* _SYSFS_H_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue