summaryrefslogtreecommitdiff
path: root/fs/logfs
diff options
context:
space:
mode:
authorPrasad Joshi <prasadjoshi.linux@gmail.com>2012-04-02 07:53:04 +0400
committerPrasad Joshi <prasadjoshi.linux@gmail.com>2012-04-02 16:34:00 +0400
commitcd8bfa9c8a13cf3facc5731da17e10188b3795d1 (patch)
tree29dc3a2967d8a54528f39b1a631c68741a2a2197 /fs/logfs
parentd2dcd9083f101584e029cbd4f0e1a4e573170d43 (diff)
downloadlinux-cd8bfa9c8a13cf3facc5731da17e10188b3795d1.tar.xz
logfs: initialize the number of iovecs in bio
This fixes the following crash when a LogFS file system, created on a encrypted LVM volume, was mounted [ 526.548034] BUG: unable to handle kernel NULL pointer dereference at [ 526.550106] IP: [<ffffffff8131ecab>] memcpy+0xb/0x120 [ 526.551008] PGD bd60067 PUD 1778d067 PMD 0 [ 526.551783] Oops: 0000 [#1] SMP <d>Pid: 2043, comm: mount <d>RIP: 0010:[<ffffffff8131ecab>] [<ffffffff8131ecab>] memcpy+0xb/0x120 Call Trace: kcryptd_io_read+0xdb/0x100 crypt_map+0xfd/0x190 __map_bio+0x48/0x150 __split_and_process_bio+0x51b/0x630 dm_request+0x138/0x230 generic_make_request+0xca/0x100 submit_bio+0x87/0x110 sync_request+0xdd/0x120 [logfs] bdev_readpage+0x2e/0x70 [logfs] do_read_cache_page+0x82/0x180 logfs_mount+0x2ad/0x770 [logfs] mount_fs+0x47/0x1c0 vfs_kern_mount+0x72/0x110 do_kern_mount+0x54/0x110 do_mount+0x520/0x7f0 sys_mount+0x90/0xe0 Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42292 Reported-by: Witold Baryluk <baryluk@smp.if.uj.edu.pl> Signed-off-by: Prasad Joshi <prasadjoshi.linux@gmail.com>
Diffstat (limited to 'fs/logfs')
-rw-r--r--fs/logfs/dev_bdev.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/logfs/dev_bdev.c b/fs/logfs/dev_bdev.c
index df0de27c2733..ea29df36893d 100644
--- a/fs/logfs/dev_bdev.c
+++ b/fs/logfs/dev_bdev.c
@@ -26,6 +26,7 @@ static int sync_request(struct page *page, struct block_device *bdev, int rw)
struct completion complete;
bio_init(&bio);
+ bio.bi_max_vecs = 1;
bio.bi_io_vec = &bio_vec;
bio_vec.bv_page = page;
bio_vec.bv_len = PAGE_SIZE;