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]
Date:   Fri, 2 Nov 2018 11:24:03 +0530
From:   Souptick Joarder <jrdr.linux@...il.com>
To:     Kees Cook <keescook@...omium.org>
Cc:     James Bottomley <jejb@...ux.vnet.ibm.com>,
        "Martin K. Petersen" <martin.petersen@...cle.com>,
        linux-scsi <linux-scsi@...r.kernel.org>,
        linux-kernel@...r.kernel.org,
        Brajeswar Ghosh <brajeswar.linux@...il.com>,
        Sabyasachi Gupta <sabyasachi.linux@...il.com>
Subject: Re: [PATCH] scsi/aic94xx/aic94xx_hwi.c: Use dma_pool_zalloc

On Fri, Nov 2, 2018 at 2:25 AM Kees Cook <keescook@...omium.org> wrote:
>
> On Wed, Oct 31, 2018 at 9:19 PM, Souptick Joarder <jrdr.linux@...il.com> wrote:
> > Replaced dma_pool_alloc + memset with dma_pool_zalloc
> >
> > Signed-off-by: Brajeswar Ghosh <brajeswar.linux@...il.com>
> > Signed-off-by: Souptick Joarder <jrdr.linux@...il.com>
>
> Reviewed-by: Kees Cook <keescook@...omium.org>

Thanks Kees.
>
> -Kees
>
> > ---
> >  drivers/scsi/aic94xx/aic94xx_hwi.c | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/drivers/scsi/aic94xx/aic94xx_hwi.c b/drivers/scsi/aic94xx/aic94xx_hwi.c
> > index 3b8ad55e59de..2bc7615193bd 100644
> > --- a/drivers/scsi/aic94xx/aic94xx_hwi.c
> > +++ b/drivers/scsi/aic94xx/aic94xx_hwi.c
> > @@ -1057,14 +1057,13 @@ static struct asd_ascb *asd_ascb_alloc(struct asd_ha_struct *asd_ha,
> >
> >         if (ascb) {
> >                 ascb->dma_scb.size = sizeof(struct scb);
> > -               ascb->dma_scb.vaddr = dma_pool_alloc(asd_ha->scb_pool,
> > +               ascb->dma_scb.vaddr = dma_pool_zalloc(asd_ha->scb_pool,
> >                                                      gfp_flags,
> >                                                     &ascb->dma_scb.dma_handle);
> >                 if (!ascb->dma_scb.vaddr) {
> >                         kmem_cache_free(asd_ascb_cache, ascb);
> >                         return NULL;
> >                 }
> > -               memset(ascb->dma_scb.vaddr, 0, sizeof(struct scb));
> >                 asd_init_ascb(asd_ha, ascb);
> >
> >                 spin_lock_irqsave(&seq->tc_index_lock, flags);
> > --
> > 2.17.1
> >
>
>
>
> --
> Kees Cook

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ