]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] fuse: fix oops in fuse_send_readpages()
authorMiklos Szeredi <miklos@szeredi.hu>
Tue, 11 Apr 2006 05:54:49 +0000 (22:54 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 11 Apr 2006 13:18:47 +0000 (06:18 -0700)
commitbd32e9ce5cb9b24cc66c4e4b9e9c4cdd0bbbd555
treee521174613659a167f56e9890c403f9fa95a50ca
parentf69561bfec51c25e7d45bde178da97e4303aa1b1
[PATCH] fuse: fix oops in fuse_send_readpages()

During heavy parallel filesystem activity it was possible to Oops the kernel.
The reason is that read_cache_pages() could skip pages which have already been
inserted into the cache by another task.  Occasionally this may result in zero
pages actually being sent, while fuse_send_readpages() relies on at least one
page being in the request.

So check this corner case and just free the request instead of trying to send
it.

Reported and tested by Konstantin Isakov.

Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/fuse/file.c