Messages in this thread | | | Date | Tue, 08 Apr 2008 01:42:28 +0300 | From | Pekka Enberg <> | Subject | Re: [PATCH] scsi: fix sense_slab/bio swapping livelock |
| |
On Tue, 8 Apr 2008, Pekka J Enberg wrote: >> So something like the following (totally untested) patch modulo the >> pre-allocation bits.
Linus Torvalds wrote: > Hmm. I didn't check, but won't this cause problems on the freeing path > when we call kmem_cache_free() on the result but with the wrong "struct > kmem_cache" pointer?
Aah, yes. I was thinking of kmalloc() here for which it works as expected because kfree() will return the page to the proper cache. But we can relax the rules of kmem_cache_free() a bit to make this work (but perhaps add a WARN_ON() there if cache doesn't match page->slab).
Pekka
| |