The following patch removes a race condition in the network block device driver in 2.6.0*. Without this patch, the reply receiving thread could end (and free up the memory for) the request structure before the request sending thread is completely done accessing it and would then access invalid memory. This particular patch has only been compile tested and visually inspected. The invalid memory access had originally been found in a derivative nbd work that I've been developing and this race was found to be the cause (and removing the race fixed this problem).