Here's a simple patch to nbd.c to fix some of the potential for oopses (and possible corruption) should the nbd-client that handed off a socket exit (implicitly closing the socket), while the driver is still sending requests onto that socket. The oops can easily be seen when root runs "nbd-client -d /dev/nbX" after /dev/nbX has been setup and still has a bunch of I/O buffered up (and is sending requests to the socket to handle the queue). This patch doesn't change functionality. Louis D. Langholtz