libceph: fix double-free of page vector
authorSage Weil <sage@newdream.net>
Mon, 24 Oct 2011 16:05:47 +0000 (09:05 -0700)
committerSage Weil <sage@newdream.net>
Tue, 25 Oct 2011 23:10:17 +0000 (16:10 -0700)
ceph_release_page_vector() kfrees the vector; we shouldn't do it here too.

Reported-by: Jeff Wu <cpwu@tnsoft.com.cn>
Signed-off-by: Sage Weil <sage@newdream.net>
fs/ceph/addr.c

index 5ffee90d9fb560c7fdbfd91bd0ff310602bdb947..4144caf2f9d3a5ef95a7a9162b1de0cfa326cf4e 100644 (file)
@@ -345,7 +345,6 @@ static int start_read(struct inode *inode, struct list_head *page_list, int max)
 
 out_pages:
        ceph_release_page_vector(pages, nr_pages);
-       kfree(pages);
 out:
        ceph_osdc_put_request(req);
        return ret;