Skip to content

Commit

Permalink
Staging: hv: Zero out the request structure on allocation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
K. Y. Srinivasan authored and Greg Kroah-Hartman committed Apr 20, 2011
1 parent a617e39 commit c7a9a48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/hv/storvsc_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 "
Expand Down

0 comments on commit c7a9a48

Please sign in to comment.