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: <9700f700-a426-31b8-9bb2-20d8bc7f3f01@oracle.com>
Date:   Tue, 17 May 2022 19:33:35 -0500
From:   michael.christie@...cle.com
To:     mingzhe.zou@...ystack.cn, torvalds@...ux-foundation.org,
        zgrieee@...il.com, martin.petersen@...cle.com
Cc:     linux-kernel@...r.kernel.org, linux-scsi@...r.kernel.org,
        target-devel@...r.kernel.org, dongsheng.yang@...ystack.cn,
        zoumingzhe@...com
Subject: Re: [PATCH v2] scsi: target: fixup incorrect use of 'cpumask_t'

On 5/16/22 12:47 AM, mingzhe.zou@...ystack.cn wrote:
> From: mingzhe <mingzhe.zou@...ystack.cn>
> 
> In commit d72d827f2f26, I used 'cpumask_t' incorrectly.
> ```
> void iscsit_thread_get_cpumask(struct iscsi_conn *conn)
> {
>         int ord, cpu;
>         cpumask_t conn_allowed_cpumask;
>         ......
> }
> 
> static ssize_t lio_target_wwn_cpus_allowed_list_store(
>                struct config_item *item, const char *page, size_t count)
> {
>         int ret;
>         char *orig;
>         cpumask_t new_allowed_cpumask;
>         ......
> }
> ```
> 
> So, that the correct pattern should be as follows:
> ```
> cpumask_var_t mask;
> 
> if (!zalloc_cpumask_var(&mask, GFP_KERNEL))
>         return -ENOMEM;
> ... use 'mask' here as a  ...
> free_cpumask_var(mask);
> ```
> 
> Fixes: d72d827f2f26 ("scsi: target: Add iscsi/cpus_allowed_list in configfs")
> Reported-by: Test Bot <zgrieee@...il.com>
> Signed-off-by: mingzhe <mingzhe.zou@...ystack.cn>
>

Reviewed-by: Mike Christie <michael.christie@...cle.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ