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>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
c9698d6b1a
commit
815d2d50da
@@ -19,6 +19,7 @@
|
||||
#include <linux/kdev_t.h>
|
||||
#include <linux/notifier.h>
|
||||
#include <linux/genhd.h>
|
||||
#include <linux/kallsyms.h>
|
||||
#include <asm/semaphore.h>
|
||||
|
||||
#include "base.h"
|
||||
@@ -68,6 +69,10 @@ static ssize_t dev_attr_show(struct kobject *kobj, struct attribute *attr,
|
||||
|
||||
if (dev_attr->show)
|
||||
ret = dev_attr->show(dev, dev_attr, buf);
|
||||
if (ret >= (ssize_t)PAGE_SIZE) {
|
||||
print_symbol("dev_attr_show: %s returned bad count\n",
|
||||
(unsigned long)dev_attr->show);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user