Comment 157 for bug 1505564

Revision history for this message
Dan Streetman (ddstreet) wrote :

verification can be done with this script:

#!/bin/bash

modprobe nbd
qemu-nbd -d /dev/nbd0

truncate /tmp/testfile -s 20G
qemu-nbd -c /dev/nbd0 /tmp/testfile

for n in $( seq 1 250 ) ; do
  echo $n
  ( dd if=/dev/zero of=/dev/nbd0 bs=1 & )
done

qemu-nbd -d /dev/nbd0

after running that, on an unpatched system the dmesg will show a large number (~100 or more) of messages like:
[ 70.408246] block nbd0: Attempted send on closed socket

with a patched kernel, the dmesg will show a ratelimited number (~10) of those messages.

This has been verified on trusty 3.13, vivid 3.19, and wily 4.2