The patch titled

     sysfs crash debugging

has been added to the -mm tree.  Its filename is

     sysfs-crash-debugging.patch

Patches currently in -mm which might be from [EMAIL PROTECTED] are

git-netdev-janitor-fixup.patch
wireless-device-attr-fixes.patch
wireless-device-attr-fixes-2.patch
ipw2100-old-gcc-fix.patch
ieee80211_module-build-fixes.patch
ieee80211_tx-build-fix.patch
ieee80211_rx-build-fix.patch
ieee80211_crypt-build-fix.patch
ieee80211_crypt_ccmp-build-fix.patch
ieee80211_crypt_wep-build-fix.patch
ieee80211_crypt_tkip-build-fix.patch
revert-gregkh-pci-pci-assign-unassigned-resources.patch
dpt_i2o-warning-fix.patch
aic79xx-ahd_linux_dev_reset-cleanup.patch
bk-watchdog.patch
zatm-kfree-fix.patch
e1000-printk-warning-fix-2.patch
net-add-driver-for-the-nic-on-cell-blades-kconfig-fix.patch
ipw2200-build-fix.patch
x86_64-div-by-zero-fix.patch
page_uptodate-locking-scalability-fix.patch
yealink-updates.patch
pselect-ppoll-system-calls-tidy.patch
pselect-ppoll-system-calls-sigset_t-fix-2.patch
pselect-ppoll-system-calls-sigset_t-fix-3.patch
xip-empty_zero_page-build-fix.patch
reset-real_timer-target-on-exec-leader-change-coding-style-fixes.patch
smsc-ircc2-pm-cleanup-do-not-close-device-when-suspending-fixes.patch
connector-exit-notifier-fix.patch
connector-add-a-fork-connector-use-after-free-fix.patch
jbd-split-checkpoint-lists-tweaks.patch
revert-fix-broken-kmalloc_node-in-rc1-rc2.patch
nr_blockdev_pages-in_interrupt-warning.patch
sysfs-crash-debugging.patch
asfs-filesystem-driver-fixes.patch
reiser4-swsusp-build-fix.patch
reiser4-printk-warning-fix.patch
reiser4-mm-remove-pg_highmem-fix.patch
v9fs-debug-and-support-routines-fix.patch
timer-initialization-cleanup-define_timer-pluto-fix.patch



From: Andrew Morton <[EMAIL PROTECTED]>

Display the most-recently-opened sysfs file's name when oopsing.

Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---

 arch/i386/kernel/traps.c |    6 ++++++
 fs/sysfs/file.c          |    7 +++++++
 2 files changed, 13 insertions(+)

diff -puN fs/sysfs/file.c~sysfs-crash-debugging fs/sysfs/file.c
--- 25/fs/sysfs/file.c~sysfs-crash-debugging    Fri Jul  8 14:33:11 2005
+++ 25-akpm/fs/sysfs/file.c     Fri Jul  8 14:47:38 2005
@@ -6,6 +6,8 @@
 #include <linux/dnotify.h>
 #include <linux/kobject.h>
 #include <linux/namei.h>
+#include <linux/limits.h>
+
 #include <asm/uaccess.h>
 #include <asm/semaphore.h>
 
@@ -324,8 +326,13 @@ static int check_perm(struct inode * ino
        return error;
 }
 
+char last_sysfs_file[PATH_MAX];
+
 static int sysfs_open_file(struct inode * inode, struct file * filp)
 {
+       d_path(filp->f_dentry, sysfs_mount, last_sysfs_file,
+                       sizeof(last_sysfs_file));
+
        return check_perm(inode,filp);
 }
 
diff -puN arch/i386/kernel/traps.c~sysfs-crash-debugging 
arch/i386/kernel/traps.c
--- 25/arch/i386/kernel/traps.c~sysfs-crash-debugging   Fri Jul  8 14:36:15 2005
+++ 25-akpm/arch/i386/kernel/traps.c    Fri Jul  8 14:37:01 2005
@@ -337,6 +337,12 @@ void die(const char * str, struct pt_reg
 #endif
                if (nl)
                        printk("\n");
+               {
+                       extern char last_sysfs_name[];
+
+                       printk(KERN_ALERT "last sysfs file: %s\n",
+                                       last_sysfs_name);
+               }
        notify_die(DIE_OOPS, (char *)str, regs, err, 255, SIGSEGV);
                show_registers(regs);
        } else
_
-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to