It allows you to group several statements into one macro.
Assume you did something like:
if (foo)
INIT_LIST_HEAD(bar);
If the macro was defined without the encapsulating do { ... } while (0);, the above code would expand to
if (foo)
(bar)->next = (bar);
(bar)->prev = (bar);
This is clearly not what was intended, as only the first statement will be executed if foo holds. The second statement would be executed regardless of whether foo holds.
Edit: Further explanation at http://c-faq.com/cpp/multistmt.html and http://developer.apple.com/documentation/DeveloperTools/gcc-4.0.1/cpp/Swallowing-the-Semicolon.html#Swallowing-the-Semicolon