NVMe: Zero the command before we send it
[linux-2.6-block.git] / drivers / block / nvme.c
index 1e57737b17606f0acdd0e6f65c7c1b6a086518c2..25ca7af964699ebb5fe0bb3e5be72b9985883a21 100644 (file)
@@ -322,6 +322,7 @@ static int nvme_submit_bio_queue(struct nvme_queue *nvmeq, struct nvme_ns *ns,
        spin_lock_irqsave(&nvmeq->q_lock, flags);
        cmnd = &nvmeq->sq_cmds[nvmeq->sq_tail];
 
+       memset(cmnd, 0, sizeof(*cmnd));
        if (bio_data_dir(bio)) {
                cmnd->rw.opcode = nvme_cmd_write;
                dma_dir = DMA_TO_DEVICE;