Re: [patch] fix race in __block_prepare_write (again)

2005-04-22 Thread Nikita Danilov
Anton Altaparmakov writes: [...] > > mm/filemap.c::file_buffered_write(): > > - It calls fault_in_pages_readable() which is completely bogus if > @nr_segs > 1. It needs to be replaced by a to be written > "fault_in_pages_readable_iovec()". Which will be only marginally less bogus,

Re: [patch] fix race in __block_prepare_write (again)

2005-04-22 Thread Anton Altaparmakov
On Fri, 2005-04-22 at 19:10 +0400, Nikita Danilov wrote: > Anton Altaparmakov writes: > > mm/filemap.c::file_buffered_write(): > > > > - It calls fault_in_pages_readable() which is completely bogus if > > @nr_segs > 1. It needs to be replaced by a to be written > >

Re: [patch] fix race in __block_prepare_write (again)

2005-04-22 Thread Anton Altaparmakov
On Fri, 2005-04-22 at 19:10 +0400, Nikita Danilov wrote: Anton Altaparmakov writes: mm/filemap.c::file_buffered_write(): - It calls fault_in_pages_readable() which is completely bogus if @nr_segs 1. It needs to be replaced by a to be written fault_in_pages_readable_iovec().

Re: [patch] fix race in __block_prepare_write (again)

2005-04-22 Thread Nikita Danilov
Anton Altaparmakov writes: [...] mm/filemap.c::file_buffered_write(): - It calls fault_in_pages_readable() which is completely bogus if @nr_segs 1. It needs to be replaced by a to be written fault_in_pages_readable_iovec(). Which will be only marginally less bogus, because

Re: [patch] fix race in __block_prepare_write (again)

2005-04-21 Thread Anton Altaparmakov
On Thu, 2005-04-21 at 17:20 +1000, Nick Piggin wrote: > On Thu, 2005-04-21 at 08:10 +0100, Anton Altaparmakov wrote: > > And one more thing... > > > > On Thu, 2005-04-21 at 08:01 +0100, Anton Altaparmakov wrote: > > > On Thu, 21 Apr 2005, Nick Piggin wrote: > > > > ... I somehow didn't send it to

Re: [patch] fix race in __block_prepare_write (again)

2005-04-21 Thread Nick Piggin
On Thu, 2005-04-21 at 08:10 +0100, Anton Altaparmakov wrote: > And one more thing... > > On Thu, 2005-04-21 at 08:01 +0100, Anton Altaparmakov wrote: > > On Thu, 21 Apr 2005, Nick Piggin wrote: > > > ... I somehow didn't send it to Andrew last time. > > > > > > Fix a race where

Re: [patch] fix race in __block_prepare_write (again)

2005-04-21 Thread Nick Piggin
On Thu, 2005-04-21 at 08:01 +0100, Anton Altaparmakov wrote: > Any reason why you left the goto out? It would be IMO much cleaner to > remove the label "out" altogether and replace the single "goto out" with a > "break" (which is fine since the goto happens inside the for loop > immediately

Re: [patch] fix race in __block_prepare_write (again)

2005-04-21 Thread Anton Altaparmakov
And one more thing... On Thu, 2005-04-21 at 08:01 +0100, Anton Altaparmakov wrote: > On Thu, 21 Apr 2005, Nick Piggin wrote: > > ... I somehow didn't send it to Andrew last time. > > > > Fix a race where __block_prepare_write can leak out an in-flight > > read against a bh if get_block returns

Re: [patch] fix race in __block_prepare_write (again)

2005-04-21 Thread Anton Altaparmakov
Hi, On Thu, 21 Apr 2005, Nick Piggin wrote: > ... I somehow didn't send it to Andrew last time. > > Fix a race where __block_prepare_write can leak out an in-flight > read against a bh if get_block returns an error. This can lead to > the page becoming unlocked while the buffer is locked and the

[patch] fix race in __block_prepare_write (again)

2005-04-21 Thread Nick Piggin
... I somehow didn't send it to Andrew last time. -- SUSE Labs, Novell Inc. Fix a race where __block_prepare_write can leak out an in-flight read against a bh if get_block returns an error. This can lead to the page becoming unlocked while the buffer is locked and the read still in flight.

[patch] fix race in __block_prepare_write

2005-04-21 Thread Nick Piggin
Questions? Comments? -- SUSE Labs, Novell Inc. Fix a race where __block_prepare_write can leak out an in-flight read against a bh if get_block returns an error. This can lead to the page becoming unlocked while the buffer is locked and the read still in flight. __mpage_writepage BUGs on this

[patch] fix race in __block_prepare_write

2005-04-21 Thread Nick Piggin
Questions? Comments? -- SUSE Labs, Novell Inc. Fix a race where __block_prepare_write can leak out an in-flight read against a bh if get_block returns an error. This can lead to the page becoming unlocked while the buffer is locked and the read still in flight. __mpage_writepage BUGs on this

[patch] fix race in __block_prepare_write (again)

2005-04-21 Thread Nick Piggin
... I somehow didn't send it to Andrew last time. -- SUSE Labs, Novell Inc. Fix a race where __block_prepare_write can leak out an in-flight read against a bh if get_block returns an error. This can lead to the page becoming unlocked while the buffer is locked and the read still in flight.

Re: [patch] fix race in __block_prepare_write (again)

2005-04-21 Thread Anton Altaparmakov
Hi, On Thu, 21 Apr 2005, Nick Piggin wrote: ... I somehow didn't send it to Andrew last time. Fix a race where __block_prepare_write can leak out an in-flight read against a bh if get_block returns an error. This can lead to the page becoming unlocked while the buffer is locked and the read

Re: [patch] fix race in __block_prepare_write (again)

2005-04-21 Thread Anton Altaparmakov
And one more thing... On Thu, 2005-04-21 at 08:01 +0100, Anton Altaparmakov wrote: On Thu, 21 Apr 2005, Nick Piggin wrote: ... I somehow didn't send it to Andrew last time. Fix a race where __block_prepare_write can leak out an in-flight read against a bh if get_block returns an error.

Re: [patch] fix race in __block_prepare_write (again)

2005-04-21 Thread Nick Piggin
On Thu, 2005-04-21 at 08:01 +0100, Anton Altaparmakov wrote: Any reason why you left the goto out? It would be IMO much cleaner to remove the label out altogether and replace the single goto out with a break (which is fine since the goto happens inside the for loop immediately after which

Re: [patch] fix race in __block_prepare_write (again)

2005-04-21 Thread Nick Piggin
On Thu, 2005-04-21 at 08:10 +0100, Anton Altaparmakov wrote: And one more thing... On Thu, 2005-04-21 at 08:01 +0100, Anton Altaparmakov wrote: On Thu, 21 Apr 2005, Nick Piggin wrote: ... I somehow didn't send it to Andrew last time. Fix a race where __block_prepare_write can leak

Re: [patch] fix race in __block_prepare_write (again)

2005-04-21 Thread Anton Altaparmakov
On Thu, 2005-04-21 at 17:20 +1000, Nick Piggin wrote: On Thu, 2005-04-21 at 08:10 +0100, Anton Altaparmakov wrote: And one more thing... On Thu, 2005-04-21 at 08:01 +0100, Anton Altaparmakov wrote: On Thu, 21 Apr 2005, Nick Piggin wrote: ... I somehow didn't send it to Andrew last