]> git.ipfire.org Git - thirdparty/qemu.git/commit
nbd: Don't validate from and len in NBD_CMD_DISC.
authorHani Benhabiles <kroosec@gmail.com>
Sun, 18 May 2014 10:50:05 +0000 (11:50 +0100)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Wed, 16 Jul 2014 00:28:01 +0000 (19:28 -0500)
commitcf392d2c7c0f10adc5d9d4f740e034b646605fff
tree90765b8e09525a9ea3fcb250d2860933aeb37652
parent3c3d8c6d19f704796de9a7873b13ba723161d3bd
nbd: Don't validate from and len in NBD_CMD_DISC.

These values aren't used in this case.

Currently, the from field in the request sent by the nbd kernel module leading
to a false error message when ending the connection with the client.

$ qemu-nbd some.img -v
// After nbd-client -d /dev/nbd0
nbd.c:nbd_trip():L1031: From: 18446744073709551104, Len: 0, Size: 20971520,
Offset: 0
nbd.c:nbd_trip():L1032: requested operation past EOF--bad client?
nbd.c:nbd_receive_request():L638: read failed

Signed-off-by: Hani Benhabiles <kroosec@gmail.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit 8c5d1abbb79193dca8e4823ef53d8d1e650362ae)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
nbd.c