]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Staging: hv: Zero out the request structure on allocation
authorK. Y. Srinivasan <kys@microsoft.com>
Wed, 6 Apr 2011 18:25:39 +0000 (11:25 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 20 Apr 2011 20:32:06 +0000 (13:32 -0700)
As part of the cleanup of the I/O request structure, allocate them zeroed
out. This fixes a bug that was introduced in the patch-set titled:
Staging: hv: Cleanup-storage-drivers-phase-II.
A corrected version of this patch-set was sent out earlier, however
the earlier (buggy) version of this patch-set was already applied.
This patch fixes the problem.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/hv/storvsc_drv.c

index 6128ffd026c1c7aaf17537de2cd5f5d5eb673fd5..ae617351992434da2e541d75b65076bcaf930174 100644 (file)
@@ -738,7 +738,7 @@ static int storvsc_queuecommand_lck(struct scsi_cmnd *scmnd,
 
        request_size = sizeof(struct storvsc_cmd_request);
 
-       cmd_request = kmem_cache_alloc(host_device_ctx->request_pool,
+       cmd_request = kmem_cache_zalloc(host_device_ctx->request_pool,
                                       GFP_ATOMIC);
        if (!cmd_request) {
                DPRINT_ERR(STORVSC_DRV, "scmnd (%p) - unable to allocate "