lkml.org 
[lkml]   [1998]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] dcache corruption


On Tue, 6 Jan 1998, Peter J. Braam wrote:
>
> I spotted the following code a while ago and I believe it's not safe:
>
> d_free(dentry);
> if (dentry == parent)
> return;
> (line 115). This is referencing freed memory -- since d_free frees
> everyting.

No, it's only referencing the _pointer_ - not anything the pointer points
to. It's essentially saying that if the parent dentry (which we looked up
earlier, before the free) is the same as the dentry we just free'd, we
should not continue downwards in the dentry tree.

Linus


\
 
 \ /
  Last update: 2005-03-22 13:41    [W:0.034 / U:1.588 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site