Re: [PATCH] Re: test10-pre7

2000-10-31 Thread John Kennedy
On Mon, Oct 30, 2000 at 03:34:44PM -0500, Alexander Viro wrote: > Unfortunately, it doesn't fix the thing. ->sync_page() is called ... > Minimal patch (against -pre7) follows. It still leaves sync_page() problem > open - any suggestions on that one are very welcome. ... I needed to patch your p

Re: [PATCH] Re: test10-pre7

2000-10-30 Thread Linus Torvalds
On Mon, 30 Oct 2000, Alexander Viro wrote: > > Fine with me. Just let's remember that it should be revisited in 2.5. > What about filemap_swapout()? If you agree with checking ->mapping > there... looks like we are done with that crap for the time being. Yup, I agree. I already applied your pa

Re: [PATCH] Re: test10-pre7

2000-10-30 Thread Alexander Viro
On Mon, 30 Oct 2000, Linus Torvalds wrote: > Ok, sync_page() looks like a broken design, but I suspect that for > expediency the simplest fix is to just make the NFS sync_page() (re-)check > for "mapping == NULL", and let it be at that. Avoid the NULL pointer > dereference (very small window al

Re: [PATCH] Re: test10-pre7

2000-10-30 Thread Linus Torvalds
On Mon, 30 Oct 2000, Alexander Viro wrote: > > [ sync_page brokenness ] > > To elaborate: the thing is called if we get a contention on the page lock. Ok, sync_page() looks like a broken design, but I suspect that for expediency the simplest fix is to just make the NFS sync_page() (re-)check f

Re: [PATCH] Re: test10-pre7

2000-10-30 Thread Linus Torvalds
On Mon, 30 Oct 2000, Alexander Viro wrote: > > > I didn't actually miss it, I just looked at the users and decided that it > > looks like they should never have this issue. But I might have missed > > something. As far as I can tell, "read_cache_page()" is only used for > > meta-data like thing

Re: [PATCH] Re: test10-pre7

2000-10-30 Thread Rik van Riel
On Mon, 30 Oct 2000, Alexander Viro wrote: > The last one is in deactivate_page_nolock() - there we check the > ->mapping without pagecache_lock and without page lock. Hell > knows whether it's a bug or not. Rik? Shouldn't be a problem, since we'll have the lock at a time we actually /do/ someth

Re: [PATCH] Re: test10-pre7

2000-10-30 Thread Alexander Viro
On Mon, 30 Oct 2000, Alexander Viro wrote: > > > On Mon, 30 Oct 2000, Linus Torvalds wrote: > > > How about just changing ->sync_page() semantics to own the page lock? That > > sound slike the right thing anyway, no? > > It would kill the ->sync_page(), but yes, _that_ might be the right th

Re: [PATCH] Re: test10-pre7

2000-10-30 Thread Alexander Viro
On Mon, 30 Oct 2000, Linus Torvalds wrote: > How about just changing ->sync_page() semantics to own the page lock? That > sound slike the right thing anyway, no? It would kill the ->sync_page(), but yes, _that_ might be the right thing ;-) > I didn't actually miss it, I just looked at the use

Re: [PATCH] Re: test10-pre7

2000-10-30 Thread Linus Torvalds
On Mon, 30 Oct 2000, Alexander Viro wrote: > > Unfortunately, it doesn't fix the thing. ->sync_page() is called when we > do not own the page lock and nfs_sync_page() uses page->mapping. Yes, we > check it before calling the bloody thing, but we don't own the lock. Good catch. > Problem only