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:   Wed, 01 Aug 2018 08:47:24 -0700
From:   Joe Perches <joe@...ches.com>
To:     Andy Shevchenko <andy.shevchenko@...il.com>,
        zhong jiang <zhongjiang@...wei.com>
Cc:     John Garry <john.garry@...wei.com>,
        "James E . J . Bottomley" <jejb@...ux.vnet.ibm.com>,
        "Martin K. Petersen" <martin.petersen@...cle.com>,
        aacraid@...rosemi.com, linux-scsi <linux-scsi@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/4] driver/scsi/fnic/fnic_trace: Use vzalloc to zero
 instead of vmalloc+memset

On Wed, 2018-08-01 at 18:30 +0300, Andy Shevchenko wrote:
> On Wed, Aug 1, 2018 at 4:26 PM, zhong jiang <zhongjiang@...wei.com> wrote:
> > The vzalloc is better than vmalloc+memset, so replace them to make
> > the code concise.
> > -       fnic_trace_buf_p = (unsigned long)vmalloc((trace_max_pages * PAGE_SIZE));
> > +       fnic_trace_buf_p = (unsigned long)vzalloc((trace_max_pages * PAGE_SIZE));
> 
> At the same time you may get rid of unnecessary parens.

And at the same time, perhaps use kvcalloc and kvfree
instead of always using vmalloc as the allocation size
can be less than the allowable for a single kmalloc.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ