mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: michael.christie@oracle.com
To: mingzhe.zou@easystack.cn, torvalds@linux-foundation.org,
	zgrieee@gmail.com, martin.petersen@oracle.com
Cc: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
	target-devel@vger.kernel.org, dongsheng.yang@easystack.cn,
	zoumingzhe@qq.com
Subject: Re: [PATCH v2] scsi: target: fixup incorrect use of 'cpumask_t'
Date: Tue, 17 May 2022 19:33:35 -0500	[thread overview]
Message-ID: <9700f700-a426-31b8-9bb2-20d8bc7f3f01@oracle.com> (raw)
In-Reply-To: <20220516054721.1548-1-mingzhe.zou@easystack.cn>

On 5/16/22 12:47 AM, mingzhe.zou@easystack.cn wrote:
> From: mingzhe <mingzhe.zou@easystack.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@gmail.com>
> Signed-off-by: mingzhe <mingzhe.zou@easystack.cn>
>

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

  reply	other threads:[~2022-05-18  0:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-16  5:47 mingzhe.zou
2022-05-18  0:33 ` michael.christie [this message]
2022-05-18  1:55 ` Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9700f700-a426-31b8-9bb2-20d8bc7f3f01@oracle.com \
    --to=michael.christie@oracle.com \
    --cc=dongsheng.yang@easystack.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=mingzhe.zou@easystack.cn \
    --cc=target-devel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=zgrieee@gmail.com \
    --cc=zoumingzhe@qq.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®