aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2008-03-04 18:09:07 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2008-03-25 01:33:49 -0400
commit815d2d50da41f28aae58f5e9b3c61c3094422749 (patch)
treef5c3a8f1cd676ef7ed76ea6cc96ccf399310f7fb /drivers
parentc9698d6b1a90929e427a165bd8283f803f57d9bd (diff)
driver core: debug for bad dev_attr_show() return value.
Try to find the culprit who caused http://bugzilla.kernel.org/show_bug.cgi?id=10150 Cc: <balajirrao@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/base/core.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c
index 7de543d1d0b4..24198ad01976 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -19,6 +19,7 @@
19#include <linux/kdev_t.h> 19#include <linux/kdev_t.h>
20#include <linux/notifier.h> 20#include <linux/notifier.h>
21#include <linux/genhd.h> 21#include <linux/genhd.h>
22#include <linux/kallsyms.h>
22#include <asm/semaphore.h> 23#include <asm/semaphore.h>
23 24
24#include "base.h" 25#include "base.h"
@@ -68,6 +69,10 @@ static ssize_t dev_attr_show(struct kobject *kobj, struct attribute *attr,
68 69
69 if (dev_attr->show) 70 if (dev_attr->show)
70 ret = dev_attr->show(dev, dev_attr, buf); 71 ret = dev_attr->show(dev, dev_attr, buf);
72 if (ret >= (ssize_t)PAGE_SIZE) {
73 print_symbol("dev_attr_show: %s returned bad count\n",
74 (unsigned long)dev_attr->show);
75 }
71 return ret; 76 return ret;
72} 77}
73 78