On Wed, 17 Oct 2007, Jens Axboe wrote:Ok, I think that one-liner fixes the real bug. But I think the rest of your changes are simply bad. The fix to block/ll_rw_block.c should likely be something like the appended instead: - remove the "memset()" you had added earlier. It's bogus. It cannot be the right thing. If the sg list wasn't initialized correctly much earlier, trying to initialize it late is pointless - it contains crap. - the old code was fine, but let's initialize "sg" to NULL to make it clear that the initial value of sg is pointless, and only "next_sg" matters (since sg had better be assigned from that). Hmm? Linus --- diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c index 9e3f3cc..54d974e 100644 --- a/block/ll_rw_blk.c +++ b/block/ll_rw_blk.c @@ -1333,7 +1333,8 @@ int blk_rq_map_sg(struct request_queue *q, struct request *rq, * for each bio in rq */ bvprv = NULL; - sg = next_sg = &sglist[0]; + sg = NULL; + next_sg = &sglist[0]; rq_for_each_segment(bvec, rq, iter) { int nbytes = bvec->bv_len; @@ -1352,7 +1353,6 @@ new_segment: sg = next_sg; next_sg = sg_next(sg); - memset(sg, 0, sizeof(*sg)); sg->page = bvec->bv_page; sg->length = nbytes; sg->offset = bvec->bv_offset; -
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Linus Torvalds | Linux 2.6.27-rc8 |
| Christoph Lameter | Re: Major regression on hackbench with SLUB (more numbers) |
| Mike Travis | Re: [RFC 00/15] x86_64: Optimize percpu accesses |
git: | |
| Gerrit Renker | [PATCH 15/37] dccp: Set per-connection CCIDs via socket options |
| Jarek Poplawski | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| David Miller | [GIT]: Networking |
| Hugh Dickins | Re: [bug?] tg3: Failed to load firmware "tigon/tg3_tso.bin" |
