Messages in this thread | | | Date | Mon, 30 Aug 2010 19:56:24 +0200 | From | Jens Axboe <> | Subject | Re: [PATCH v6] scatterlist: prevent invalid free when alloc fails |
| |
On 2010-08-30 18:19, Jeffrey Carlyle wrote: > When alloc fails, free_table is being called. Depending on the number of > bytes requested, we determine if we are going to call _get_free_page() > or kmalloc(). When alloc fails, our math is wrong (due to sg_size - 1), > and the last buffer is wrongfully assumed to have been allocated by > kmalloc. Hence, kfree gets called and a panic occurs.
That's a lot of revs, thanks for getting it done (and Tejun for the careful reviews).
-- Jens Axboe
| |