Loading drivers/base/core.c +5 −0 Original line number Diff line number Diff line Loading @@ -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" Loading Loading @@ -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; } Loading drivers/uio/uio.c +2 −0 Original line number Diff line number Diff line Loading @@ -470,6 +470,8 @@ static int uio_mmap_physical(struct vm_area_struct *vma) vma->vm_flags |= VM_IO | VM_RESERVED; vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); return remap_pfn_range(vma, vma->vm_start, idev->info->mem[mi].addr >> PAGE_SHIFT, Loading fs/sysfs/file.c +7 −1 Original line number Diff line number Diff line Loading @@ -12,6 +12,7 @@ #include <linux/module.h> #include <linux/kobject.h> #include <linux/kallsyms.h> #include <linux/namei.h> #include <linux/poll.h> #include <linux/list.h> Loading Loading @@ -86,7 +87,12 @@ static int fill_read_buffer(struct dentry * dentry, struct sysfs_buffer * buffer * The code works fine with PAGE_SIZE return but it's likely to * indicate truncated result or overflow in normal use cases. */ BUG_ON(count >= (ssize_t)PAGE_SIZE); if (count >= (ssize_t)PAGE_SIZE) { print_symbol("fill_read_buffer: %s returned bad count\n", (unsigned long)ops->show); /* Try to struggle along */ count = PAGE_SIZE - 1; } if (count >= 0) { buffer->needs_read_fill = 0; buffer->count = count; Loading Loading
drivers/base/core.c +5 −0 Original line number Diff line number Diff line Loading @@ -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" Loading Loading @@ -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; } Loading
drivers/uio/uio.c +2 −0 Original line number Diff line number Diff line Loading @@ -470,6 +470,8 @@ static int uio_mmap_physical(struct vm_area_struct *vma) vma->vm_flags |= VM_IO | VM_RESERVED; vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); return remap_pfn_range(vma, vma->vm_start, idev->info->mem[mi].addr >> PAGE_SHIFT, Loading
fs/sysfs/file.c +7 −1 Original line number Diff line number Diff line Loading @@ -12,6 +12,7 @@ #include <linux/module.h> #include <linux/kobject.h> #include <linux/kallsyms.h> #include <linux/namei.h> #include <linux/poll.h> #include <linux/list.h> Loading Loading @@ -86,7 +87,12 @@ static int fill_read_buffer(struct dentry * dentry, struct sysfs_buffer * buffer * The code works fine with PAGE_SIZE return but it's likely to * indicate truncated result or overflow in normal use cases. */ BUG_ON(count >= (ssize_t)PAGE_SIZE); if (count >= (ssize_t)PAGE_SIZE) { print_symbol("fill_read_buffer: %s returned bad count\n", (unsigned long)ops->show); /* Try to struggle along */ count = PAGE_SIZE - 1; } if (count >= 0) { buffer->needs_read_fill = 0; buffer->count = count; Loading