[lkml]   [2002]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectPatch for a leak of anonymous devices
Hi, Al:

Arjan used your fix from 2.5 which simply moves the allocation
of the device. Are you going to change in in 2.4 too?
Here's what I did for 2.4.18-pre6 temporarily:

--- linux-2.4.18-pre6/fs/super.c Tue Apr 9 11:58:25 2002
+++ linux-2.4.18-pre6-p3/fs/super.c Tue Apr 9 11:53:43 2002
@@ -632,6 +632,9 @@
if (!grab_super(old))
goto retry;
+ spin_lock(&unnamed_dev_lock);
+ clear_bit(dev, unnamed_dev_in_use);
+ spin_unlock(&unnamed_dev_lock);
return old;
Another question: your code allows to allocate device (0,0).
I assume you found it safe; everything works. However, why
is it safe? Do we have no functions that return zero as a
device number to indicate a failure?

My moremounts patch simple pre-sets the first bit of the
unnamed_dev_in_use bitmap to avoid this. But perhaps I am
paranoid here.

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

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