Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 74308
b: refs/heads/master
c: 8118a85
h: refs/heads/master
v: v3
  • Loading branch information
Miao Xie authored and Greg Kroah-Hartman committed Nov 28, 2007
1 parent 617d7fa commit 35274b3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 71409a498e96a421bdc20e7275ebc4fab8b14cdc
refs/heads/master: 8118a859dc7abd873193986c77a8d9bdb877adc8
6 changes: 5 additions & 1 deletion trunk/fs/sysfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,11 @@ static int fill_read_buffer(struct dentry * dentry, struct sysfs_buffer * buffer

sysfs_put_active_two(attr_sd);

BUG_ON(count > (ssize_t)PAGE_SIZE);
/*
* 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 >= 0) {
buffer->needs_read_fill = 0;
buffer->count = count;
Expand Down

0 comments on commit 35274b3

Please sign in to comment.