Re: lseek/llseek allows the negative offset

2000-11-19 Thread Andrea Arcangeli
On Sat, Nov 18, 2000 at 05:20:34PM -0800, H . J . Lu wrote: > --- linux/fs/proc/mem.c.lseek Tue Jan 4 10:12:23 2000 > +++ linux/fs/proc/mem.c Sat Nov 18 17:19:28 2000 > @@ -196,14 +196,17 @@ static long long mem_lseek(struct file * > { > switch (orig) { > case 0: > -

Re: lseek/llseek allows the negative offset

2000-11-19 Thread Andrea Arcangeli
On Sat, Nov 18, 2000 at 05:20:34PM -0800, H . J . Lu wrote: --- linux/fs/proc/mem.c.lseek Tue Jan 4 10:12:23 2000 +++ linux/fs/proc/mem.c Sat Nov 18 17:19:28 2000 @@ -196,14 +196,17 @@ static long long mem_lseek(struct file * { switch (orig) { case 0: -

Re: lseek/llseek allows the negative offset

2000-11-18 Thread H . J . Lu
On Sun, Nov 19, 2000 at 04:07:04AM +0100, Andrea Arcangeli wrote: > On Sat, Nov 18, 2000 at 05:20:34PM -0800, H . J . Lu wrote: > > Try this again 2.2.18pre21. It works for me. > > > > > > -- > > H.J. Lu ([EMAIL PROTECTED]) > > --- > > --- linux/fs/ext2/file.c.lseek Sat Nov 18 17:18:49

Re: lseek/llseek allows the negative offset

2000-11-18 Thread Andrea Arcangeli
On Sat, Nov 18, 2000 at 05:20:34PM -0800, H . J . Lu wrote: > Try this again 2.2.18pre21. It works for me. > > > -- > H.J. Lu ([EMAIL PROTECTED]) > --- > --- linux/fs/ext2/file.c.lseekSat Nov 18 17:18:49 2000 > +++ linux/fs/ext2/file.c Sat Nov 18 17:19:28 2000 > @@ -120,6 +120,8

Re: lseek/llseek allows the negative offset

2000-11-18 Thread H . J . Lu
On Sun, Nov 19, 2000 at 01:45:12AM +0100, Andrea Arcangeli wrote: > On Sat, Nov 18, 2000 at 07:25:42PM +0100, Andrea Arcangeli wrote: > > I fixed it this way: > > fix is plain wrong, it's still possible to have lseek return -1 -2 -3 -4 > even when it should return -EINVAL. > Try this again

Re: lseek/llseek allows the negative offset

2000-11-18 Thread Andrea Arcangeli
On Sat, Nov 18, 2000 at 07:25:42PM +0100, Andrea Arcangeli wrote: > I fixed it this way: fix is plain wrong, it's still possible to have lseek return -1 -2 -3 -4 even when it should return -EINVAL. Andrea - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a

Re: lseek/llseek allows the negative offset

2000-11-18 Thread H . J . Lu
On Sat, Nov 18, 2000 at 07:25:42PM +0100, Andrea Arcangeli wrote: > On Fri, Nov 17, 2000 at 04:09:00PM -0800, H . J . Lu wrote: > > On Fri, Nov 17, 2000 at 03:59:13PM -0800, H . J . Lu wrote: > > > # gcc x.c > > > # ./a.out > > > lseek on -10: -10 > > > write: File too large > > > > > >

Re: lseek/llseek allows the negative offset

2000-11-18 Thread Andrea Arcangeli
On Fri, Nov 17, 2000 at 04:09:00PM -0800, H . J . Lu wrote: > On Fri, Nov 17, 2000 at 03:59:13PM -0800, H . J . Lu wrote: > > # gcc x.c > > # ./a.out > > lseek on -10: -10 > > write: File too large > > > > Should kernel allow negative offsets for lseek/llseek? > > > > > > Never mind.

Re: lseek/llseek allows the negative offset

2000-11-18 Thread Andrea Arcangeli
On Fri, Nov 17, 2000 at 04:09:00PM -0800, H . J . Lu wrote: On Fri, Nov 17, 2000 at 03:59:13PM -0800, H . J . Lu wrote: # gcc x.c # ./a.out lseek on -10: -10 write: File too large Should kernel allow negative offsets for lseek/llseek? Never mind. I was running the

Re: lseek/llseek allows the negative offset

2000-11-18 Thread Andrea Arcangeli
On Sat, Nov 18, 2000 at 07:25:42PM +0100, Andrea Arcangeli wrote: I fixed it this way: fix is plain wrong, it's still possible to have lseek return -1 -2 -3 -4 even when it should return -EINVAL. Andrea - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a

Re: lseek/llseek allows the negative offset

2000-11-18 Thread H . J . Lu
On Sun, Nov 19, 2000 at 01:45:12AM +0100, Andrea Arcangeli wrote: On Sat, Nov 18, 2000 at 07:25:42PM +0100, Andrea Arcangeli wrote: I fixed it this way: fix is plain wrong, it's still possible to have lseek return -1 -2 -3 -4 even when it should return -EINVAL. Try this again

Re: lseek/llseek allows the negative offset

2000-11-18 Thread Andrea Arcangeli
On Sat, Nov 18, 2000 at 05:20:34PM -0800, H . J . Lu wrote: Try this again 2.2.18pre21. It works for me. -- H.J. Lu ([EMAIL PROTECTED]) --- --- linux/fs/ext2/file.c.lseekSat Nov 18 17:18:49 2000 +++ linux/fs/ext2/file.c Sat Nov 18 17:19:28 2000 @@ -120,6 +120,8 @@ static

Re: lseek/llseek allows the negative offset

2000-11-18 Thread H . J . Lu
On Sun, Nov 19, 2000 at 04:07:04AM +0100, Andrea Arcangeli wrote: On Sat, Nov 18, 2000 at 05:20:34PM -0800, H . J . Lu wrote: Try this again 2.2.18pre21. It works for me. -- H.J. Lu ([EMAIL PROTECTED]) --- --- linux/fs/ext2/file.c.lseek Sat Nov 18 17:18:49 2000 +++

lseek/llseek allows the negative offset

2000-11-17 Thread H . J . Lu
# gcc x.c # ./a.out lseek on -10: -10 write: File too large Should kernel allow negative offsets for lseek/llseek? -- H.J. Lu ([EMAIL PROTECTED]) --- #include #include #include extern loff_t llseek (int fd, loff_t offset, int whence); int main () { int fd = open

lseek/llseek allows the negative offset

2000-11-17 Thread H . J . Lu
# gcc x.c # ./a.out lseek on -10: -10 write: File too large Should kernel allow negative offsets for lseek/llseek? -- H.J. Lu ([EMAIL PROTECTED]) --- #include fcntl.h #include unistd.h #include stdio.h extern loff_t llseek (int fd, loff_t offset, int whence); int main () { int fd