From: Jens Axboe <jens.axboe@oracle.com> Date: Wed, 17 Oct 2007 10:45:28 +0200Unfortunately, that's what the sparc64 code wanted to do, this transformation in the sparc64 sg chaining patch is not equilavent: - struct scatterlist *sg_end = sg + nelems; + struct scatterlist *sg_end = sg_last(sg, nelems); ... - while (sg < sg_end && + while (sg != sg_end && No, that's not what the code was doing. The while loop has to process the last entry in the list, We really needed "sg_end" to be "one past the last element", rather than "the last element". Since you say that sg_next() on the last entry is illegal, and that's what this code would have done to try and reach loop termination (it doesn't actually derefrence that "end plus one" scatterlist entry) I'll try to code this up some other way. Besides, sg_last() is so absurdly expensive, it has to walk the entire chain in the chaining case. So better to implement this without it. I would suggest that other sg_last() uses be audited for the same bug. -
| Sunil Naidu | Re: Linux 2.6.20-rc6 |
| Alan Cox | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Chris Snook | Re: init's children list is long and slows reaping children. |
| Greg Kroah-Hartman | [PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO |
git: | |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| David Miller | [GIT]: Networking |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Eric W. Biederman | Re: [PATCH 10/11] avoid kobject name conflict with different namespaces |
