lkml.org 
[lkml]   [2012]   [Jul]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: show_uevent() and general protection fault
On Mon, Jul 16, 2012 at 06:33:42PM -0700, Greg Kroah-Hartman wrote:
> On Fri, Jul 13, 2012 at 04:46:16PM +0800, Fengguang Wu wrote:
> > This is another kconfig, produced a bit different call trace, however
> > also related to sysfs_read_file().
>
> Any hint as to which file is being read?

Good idea! I added this debugging aid:

--- a/fs/sysfs/file.c
+++ b/fs/sysfs/file.c
@@ -129,6 +129,11 @@ sysfs_read_file(struct file *file, char __user *buf, size_t count, loff_t *ppos)
{
struct sysfs_buffer * buffer = file->private_data;
ssize_t retval = 0;
+ char pathname[300], *path;
+
+ path = d_path(&(file->f_path), pathname, sizeof(pathname));
+ if (!IS_ERR(path))
+ printk("%s\n", path);

mutex_lock(&buffer->mutex);
if (buffer->needs_read_fill || *ppos == 0) {
And find some sysfs files that triggered the errors:

wfg@waimea ~/kvm% grep -hB1 'kernel paging request' /tmp/dmesg-kvm_bisect-waimea-*|grep /sys/
[ 28.995741] /sys/module/tpm_tis/parameters/hid
[ 60.885798] /sys/module/tpm_tis/parameters/hid
wfg@waimea ~/kvm% grep -hB1 'general protection fault' /tmp/dmesg-kvm_bisect-waimea-*|grep -o /sys/.* | sort -u
/sys/devices/LNXSYSTM:00/device:00/PNP0103:00/uevent
/sys/devices/LNXSYSTM:00/device:00/PNP0A03:00/device:21/PNP0303:00/uevent
/sys/devices/LNXSYSTM:00/device:00/PNP0A03:00/device:21/PNP0400:00/uevent
/sys/devices/LNXSYSTM:00/device:00/PNP0A03:00/device:21/PNP0501:00/uevent
/sys/devices/LNXSYSTM:00/device:00/PNP0A03:00/device:21/PNP0700:00/uevent
/sys/devices/LNXSYSTM:00/device:00/PNP0A03:00/device:21/PNP0B00:00/uevent
/sys/devices/LNXSYSTM:00/device:00/PNP0A03:00/device:21/PNP0F13:00/uevent
/sys/devices/LNXSYSTM:00/device:00/PNP0A03:00/uevent
/sys/devices/LNXSYSTM:00/device:00/PNP0C0F:00/uevent
/sys/devices/LNXSYSTM:00/device:00/PNP0C0F:01/uevent
/sys/devices/LNXSYSTM:00/device:00/PNP0C0F:02/uevent
/sys/devices/LNXSYSTM:00/device:00/PNP0C0F:03/uevent
/sys/devices/LNXSYSTM:00/LNXCPU:00/uevent
/sys/devices/LNXSYSTM:00/LNXCPU:01/uevent
/sys/devices/LNXSYSTM:00/LNXPWRBN:00/input/input0/uevent
/sys/devices/LNXSYSTM:00/LNXPWRBN:00/uevent
/sys/devices/LNXSYSTM:00/uevent
/sys/devices/platform/i8042/serio0/input/input1/uevent
Thanks,
Fengguang


\
 
 \ /
  Last update: 2012-07-18 07:41    [W:0.074 / U:0.324 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site