On Mon, Mar 27, 2017 at 04:26:02PM +0300, Andrey Ryabinin wrote:
> [+CC drm folks, see the following threads:
>       
> http://lkml.kernel.org/r/201703232349.bgb95898.qhlvffomtfo...@i-love.sakura.ne.jp
>       
> http://lkml.kernel.org/r/1490352808-7187-1-git-send-email-penguin-ker...@i-love.sakura.ne.jp
> ]
> 
> On 03/24/2017 07:17 PM, Matthew Wilcox wrote:
> > On Fri, Mar 24, 2017 at 06:05:45PM +0300, Andrey Ryabinin wrote:
> >> Just fix the drm code. There is zero point in releasing memory under 
> >> spinlock.
> > 
> > I disagree.  The spinlock has to be held while deleting from the hash
> > table. 
> 
> And what makes you think so?

The bad naming of the function.  If somebody has a function called
'hashtable_remove' I naturally think it means "remove something from
the hash table".  This function should be called drm_ht_destroy().
And then, yes, it becomes obvious that there is no need to protect
destuction against usage because if anyone is still using the hashtable,
they're about to get a NULL pointer dereference.

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to