···12121313#include <linux/module.h>1414#include <linux/kobject.h>1515+#include <linux/kallsyms.h>1516#include <linux/namei.h>1617#include <linux/poll.h>1718#include <linux/list.h>···8786 * The code works fine with PAGE_SIZE return but it's likely to8887 * indicate truncated result or overflow in normal use cases.8988 */9090- BUG_ON(count >= (ssize_t)PAGE_SIZE);8989+ if (count >= (ssize_t)PAGE_SIZE) {9090+ print_symbol("fill_read_buffer: %s returned bad count\n",9191+ (unsigned long)ops->show);9292+ /* Try to struggle along */9393+ count = PAGE_SIZE - 1;9494+ }9195 if (count >= 0) {9296 buffer->needs_read_fill = 0;9397 buffer->count = count;