]> git.ipfire.org Git - people/ms/linux.git/commit
[PATCH] fuse: fix oops in fuse_send_readpages()
authorMiklos Szeredi <miklos@szeredi.hu>
Tue, 11 Apr 2006 16:37:57 +0000 (18:37 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 17 Apr 2006 20:16:05 +0000 (13:16 -0700)
commitadd92b7ade7eb528b7df6153f8bc773f5e2a80f1
tree9d4d27adfaf7fd5b6005c90f2f5bd6d9445dd391
parent3a62231e38fe628ec2540fb22276ea1c3af5ddd8
[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: Greg Kroah-Hartman <gregkh@suse.de>
fs/fuse/file.c