Hello, In the 0.7 branch, guess_dev_name in drbdsetup.c can go into an infinite loop while scanning for block devices. This can happen because when looking for subdirectories the return value from snprintf is not checked, and we can (due to truncation) actually recurse in the same directory, if the total path length of the current directory is exactly 49 chars (line 1247 in drbdsetup.c). This means that snprintf will truncate the new component and leave us with the current directory in the buffer. I saw this when using udev which has in /dev/.udev/failed links to the /sys filesystem which contains long paths. This causes the drbdsetup command to hang forever (if file descriptors are exhausted, it will go up the stack closing a few descriptors and then recursing again). Maybe at some point it finishes iterating, but for practical means it hangs. Attached patch does three things: - fixes this problem - fixes another wrong use of sntrcpy return value (check should be >= 50, not == 49, per sntrpcy man page values greater or equal to size show that truncation has happened) - changes another verify of this value to skip the current entry if too deep, not abort the entire search Please include this in the 0.7 branch. Regards, Iustin Pop