diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2015-03-27 10:30:48 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2015-03-27 10:30:48 +0000 |
commit | 500d76a093b81f0aa9a368039518ab333d5dbf7a (patch) | |
tree | 8d3e2a4e2f0af91982f0658fab4fb7b416e29feb /hw | |
parent | 4ad9e2b36e1e00fe5b96c3448ecd673e11c4d6d8 (diff) | |
parent | da2cf4e80355e42fbaeb8bcfa2b07f5bceddd323 (diff) |
Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging
# gpg: Signature made Fri Mar 27 10:13:35 2015 GMT using RSA key ID 81AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
# gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>"
* remotes/stefanha/tags/block-pull-request:
block: Document blockdev-add's immaturity
qemu-iotests: Test unaligned 4k zero write
block: Fix unaligned zero write
nvme: Fix unintentional integer overflow (OVERFLOW_BEFORE_WIDEN)
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/block/nvme.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 0f3dfb90ea..1e071662d2 100644 --- a/hw/block/nvme.c +++ b/hw/block/nvme.c @@ -222,7 +222,7 @@ static uint16_t nvme_rw(NvmeCtrl *n, NvmeNamespace *ns, NvmeCmd *cmd, uint8_t lba_index = NVME_ID_NS_FLBAS_INDEX(ns->id_ns.flbas); uint8_t data_shift = ns->id_ns.lbaf[lba_index].ds; - uint64_t data_size = nlb << data_shift; + uint64_t data_size = (uint64_t)nlb << data_shift; uint64_t aio_slba = slba << (data_shift - BDRV_SECTOR_BITS); int is_write = rw->opcode == NVME_CMD_WRITE ? 1 : 0; |