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]
Message-ID: <YWif4n0UhaJTf7cp@slm.duckdns.org>
Date:   Thu, 14 Oct 2021 11:23:46 -1000
From:   Tejun Heo <tj@...nel.org>
To:     menglong8.dong@...il.com
Cc:     jiangshanlai@...il.com, linux-kernel@...r.kernel.org,
        Mengen Sun <mengensun@...cent.com>
Subject: Re: [PATCH] hotfix: make sysfs of unbound kworker cpumask more clever

Hello,

On Thu, Oct 14, 2021 at 11:06:41AM +0800, menglong8.dong@...il.com wrote:
> diff --git a/kernel/workqueue.c b/kernel/workqueue.c
> index 1b3eb1e9531f..8216fc45c77b 100644
> --- a/kernel/workqueue.c
> +++ b/kernel/workqueue.c
> @@ -5394,6 +5394,11 @@ int workqueue_set_unbound_cpumask(cpumask_var_t cpumask)
>  	cpumask_and(cpumask, cpumask, cpu_possible_mask);
>  	if (!cpumask_empty(cpumask)) {
>  		apply_wqattrs_lock();
> +		if (cpumask_equal(cpumask, wq_unbound_cpumask)) {
> +			apply_wqattrs_unlock();
> +			free_cpumask_var(saved_cpumask);

A few nitpicks:

* Please replace "hotfix:" with "workqueue:".

* Can you reorganize the code so that it doesn't have to alloc and free the
  saved_mask?

Thanks.

-- 
tejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ