lkml.org 
[lkml]   [2015]   [Jun]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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...


\
 
 \ /
  Last update: 2015-06-09 23:41    [W:0.245 / U:0.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site