Messages in this thread | | | Date | Tue, 9 Jun 2015 14:25:23 -0700 | From | Andrew Morton <> | Subject | Re: [RFC][PATCH 0/5] do not dereference NULL pools in pools' destroy() functions |
| |
On Tue, 9 Jun 2015 21:04:48 +0900 Sergey Senozhatsky <sergey.senozhatsky@gmail.com> wrote:
> The existing pools' destroy() functions do not allow NULL pool pointers; > instead, every destructor() caller forced to check if pool is not NULL, > which: > a) requires additional attention from developers/reviewers > b) may lead to a NULL pointer dereferences if (a) didn't work > > > First 3 patches tweak > - kmem_cache_destroy() > - mempool_destroy() > - dma_pool_destroy() > > to handle NULL pointers.
Well I like it, even though it's going to cause a zillion little cleanup patches.
checkpatch already has a "kfree(NULL) is safe and this check is probably not required" test so I guess Joe will need to get busy ;)
I'll park these patches until after 4.1 is released - it's getting to that time...
| |