Re: [PATCH] nbd driver 2.5+: fix for incorrect struct bio usage

From: Jens Axboe (axboe@suse.de)
Date: Sun Jun 22 2003 - 03:50:06 EST


On Sat, Jun 21 2003, Lou Langholtz wrote:
> Here's a possible patch #2... I believe the address pointed to by
> bio_data(bio) is not always contiguous over the length of bio->bi_size
> and was responsible for locking my machine up sometimes. My biggest
> reason for apprehension on believeing that I'm 100% correct on this is
> that there's still what appears to be a source of memory corruption in
> the patchlet modified nbd driver even after this patch. I know the
> driver is still not correctly notifying processes of the bytesize on
> open but the size reported appears to be big enough. Anyway, thanks for
> all of the feedback so far!!!!

You are correct, the current code breaks down for multi-page bio's. It
looks like you are missing a kmap still though, bvec->bv_page could be a
highmem page.

-- 
Jens Axboe

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jun 23 2003 - 22:00:37 EST