[lkml]   [2000]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH (2.4)] atomic use count for proc_dir_entry
On Thu, 16 Nov 2000, Linus Torvalds wrote:

> On Thu, 16 Nov 2000, Dan Aloni wrote:
> >
> > Makes procfs use an atomic use count for dir entries, to avoid using
> > the Big kernel lock. Axboe says it looks ok.
> There's a race there. Look at what happens if de_put() races with
> remove_proc_entry(): we'd do free_proc_entry() twice. Not good.
> Leave the kernel lock for now.

Is this particular kernel lock helps anyway? We could have been half way
through remove_proc_entry(), line 569, for example, while in the same time
another thread enters de_put when the use count is 1 and frees the entry
while the other thread is locked just before dereferencing the entry.

So, maybe a spinlock could be used here?

Dan Aloni

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

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