From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756247Ab1DFSOZ (ORCPT ); Wed, 6 Apr 2011 14:14:25 -0400 Received: from p3plsmtps2ded03.prod.phx3.secureserver.net ([208.109.80.60]:57595 "HELO p3plsmtps2ded03-02.prod.phx3.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1756168Ab1DFSOX (ORCPT ); Wed, 6 Apr 2011 14:14:23 -0400 From: "K. Y. Srinivasan" To: gregkh@suse.de, linux-kernel@vger.kernel.org, devel@linuxdriverproject.org, virtualization@lists.osdl.org Cc: "K. Y. Srinivasan" , Hank Janssen Subject: [PATCH 2/2] Staging: hv: Zero out the request structure on allocation Date: Wed, 6 Apr 2011 11:25:39 -0700 Message-Id: <1302114339-2198-2-git-send-email-kys@microsoft.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1302114339-2198-1-git-send-email-kys@microsoft.com> References: <1302114286-2127-1-git-send-email-kys@microsoft.com> <1302114339-2198-1-git-send-email-kys@microsoft.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Signed-off-by: Hank Janssen --- drivers/staging/hv/storvsc_drv.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c index 6128ffd..ae61735 100644 --- a/drivers/staging/hv/storvsc_drv.c +++ b/drivers/staging/hv/storvsc_drv.c @@ -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 " -- 1.7.4.1