diff options
author | Eric Biederman <[email protected]> | 2009-02-18 14:48:16 -0800 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2009-02-18 15:37:53 -0800 |
commit | 8f19d472935c83d823fa4cf02bcc0a7b9952db30 (patch) | |
tree | 25cabc0b48ad0acb05fa69f92de617cf588fec8d /net/lapb/lapb_timer.c | |
parent | 55ec82176eca52e4e0530a82a0eb59160a1a95a1 (diff) |
seq_file: properly cope with pread
Currently seq_read assumes that the offset passed to it is always the
offset it passed to user space. In the case pread this assumption is
broken and we do the wrong thing when presented with pread.
To solve this I introduce an offset cache inside of struct seq_file so we
know where our logical file position is. Then in seq_read if we try to
read from another offset we reset our data structures and attempt to go to
the offset user space wanted.
[[email protected]: restore FMODE_PWRITE]
[[email protected]: seq_open needs its fmode opened up to take advantage of this]
Signed-off-by: Eric Biederman <[email protected]>
Cc: Alexey Dobriyan <[email protected]>
Cc: Al Viro <[email protected]>
Cc: Paul Turner <[email protected]>
Cc: <[email protected]> [2.6.25.x, 2.6.26.x, 2.6.27.x, 2.6.28.x]
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'net/lapb/lapb_timer.c')
0 files changed, 0 insertions, 0 deletions