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] [day] [month] [year] [list]
Date:   Tue, 18 Jun 2019 11:55:24 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Hariprasad Kelam <hariprasad.kelam@...il.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Michael Straube <straube.linux@...il.com>,
        Mamta Shukla <mamtashukla555@...il.com>,
        Nishka Dasgupta <nishkadg.linux@...il.com>,
        Emanuel Bennici <benniciemanuel78@...il.com>,
        Puranjay Mohan <puranjay12@...il.com>,
        Shobhit Kukreti <shobhitkukreti@...il.com>,
        devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [Patch v2] staging: rtl8723bs: os_dep: ioctl_linux: make use of
 kzalloc

On Tue, Jun 18, 2019 at 07:14:10AM +0530, Hariprasad Kelam wrote:
> kmalloc with memset can be replaced with kzalloc.
> 
> Signed-off-by: Hariprasad Kelam <hariprasad.kelam@...il.com>
> -----
> changes in v2: Replace rtw_zmalloc with kzalloc
> ---
> ---


The changelog should say something like:

    This patch is a cleanup which replaces rtw_malloc(wep_total_len)
    with kzalloc() and removes the memset().

    The rtw_malloc() does GFP_ATOMIC allocations when in_atomic() is true.
    But as the comments for in_atomic() describe, the in_atomic() check
    should not be used in driver code.  The in_atomic() check is not
    accurate when preempt is disabled.

    In this code we are not in IRQ context and we are not holding any
    spin_locks so GFP_KERNEL is safe.

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ