From 8504e4792403def2b9d5e1a6c91c15a1840f39c8 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Mon, 17 Jun 2002 20:19:26 -0700 Subject: [PATCH] fix loop driver for large BIOs Fix the loop driver for loop-on-blockdev setups. When presented with a multipage BIO, loop_make_request overindexes the first page and corrupts kernel memory. Fix it to walk the individual pages. BTW, I suspect the IV handling in loop may be incorrect for multipage BIOs. Should we not be recalculating the IV for each page in the BIOs, or incrementing the offset by the size of the preceding pages, or such? --- include/linux/loop.h | 8 -------- 1 file changed, 8 deletions(-) (limited to 'include/linux') diff --git a/include/linux/loop.h b/include/linux/loop.h index d4dc0665a92d..4dfa8b14a586 100644 --- a/include/linux/loop.h +++ b/include/linux/loop.h @@ -62,14 +62,6 @@ typedef int (* transfer_proc_t)(struct loop_device *, int cmd, char *raw_buf, char *loop_buf, int size, int real_block); -static inline int lo_do_transfer(struct loop_device *lo, int cmd, char *rbuf, - char *lbuf, int size, int rblock) -{ - if (!lo->transfer) - return 0; - - return lo->transfer(lo, cmd, rbuf, lbuf, size, rblock); -} #endif /* __KERNEL__ */ /* -- cgit v1.2.3