lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20B1A3CBD98F3845B3F5F56D8597EF59F98DD4@avmb2.qlogic.org>
Date:	Mon, 16 Jun 2014 06:31:43 +0000
From:	Anil Gurumurthy <Anil.Gurumurthy@...gic.com>
To:	Joe Perches <joe@...ches.com>,
	linux-kernel <linux-kernel@...r.kernel.org>
CC:	Sudarsana Kalluru <Sudarsana.Kalluru@...gic.com>,
	"James E.J. Bottomley" <JBottomley@...allels.com>,
	linux-scsi <linux-scsi@...r.kernel.org>
Subject: RE: [PATCH -next 15/26] bfa: Use dma_zalloc_coherent

Thanks for the patch.
Acked-by: Anil Gurumurthy <anil.gurumurthy@...gic.com>

-----Original Message-----
From: Joe Perches [mailto:joe@...ches.com]
Sent: 16 June 2014 02:08
To: linux-kernel
Cc: Anil Gurumurthy; Sudarsana Kalluru; James E.J. Bottomley; linux-scsi
Subject: [PATCH -next 15/26] bfa: Use dma_zalloc_coherent

Use the zeroing function instead of dma_alloc_coherent & memset(,0,)

Signed-off-by: Joe Perches <joe@...ches.com>
---
 drivers/scsi/bfa/bfad_bsg.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/bfa/bfad_bsg.c b/drivers/scsi/bfa/bfad_bsg.c index 8994fb8..65f3e74 100644
--- a/drivers/scsi/bfa/bfad_bsg.c
+++ b/drivers/scsi/bfa/bfad_bsg.c
@@ -3270,13 +3270,13 @@ bfad_fcxp_map_sg(struct bfad_s *bfad, void *payload_kbuf,
        /* Allocate dma coherent memory */
        buf_info = buf_base;
        buf_info->size = payload_len;
-       buf_info->virt = dma_alloc_coherent(&bfad->pcidev->dev, buf_info->size,
-                                       &buf_info->phys, GFP_KERNEL);
+       buf_info->virt = dma_zalloc_coherent(&bfad->pcidev->dev,
+                                            buf_info->size, &buf_info->phys,
+                                            GFP_KERNEL);
        if (!buf_info->virt)
                goto out_free_mem;

        /* copy the linear bsg buffer to buf_info */
-       memset(buf_info->virt, 0, buf_info->size);
        memcpy(buf_info->virt, payload_kbuf, buf_info->size);

        /*
--
1.8.1.2.459.gbcd45b4.dirty


________________________________

This message and any attached documents contain information from QLogic Corporation or its wholly-owned subsidiaries that may be confidential. If you are not the intended recipient, you may not read, copy, distribute, or use this information. If you have received this transmission in error, please notify the sender immediately by reply e-mail and then delete this message.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ