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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YL30jJsS+xWMjGVa@kroah.com>
Date:   Mon, 7 Jun 2021 12:27:24 +0200
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Julian Wiedmann <jwi@...ux.ibm.com>
Cc:     Tejun Heo <tj@...nel.org>, Lai Jiangshan <jiangshanlai@...il.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH wq/for-next 2/2] workqueue: let device core create the
 WQ_UNBOUND attributes

On Mon, Jun 07, 2021 at 11:44:20AM +0200, Julian Wiedmann wrote:
> Wrap the attributes for a WQ_UNBOUND workqueue in ATTRIBUTE_GROUPS(),
> and wire them up in dev->groups so that the device core can manage them
> for us.
> 
> As device_add() will add such attributes _prior_ to raising the KOBJ_ADD
> uevent, this also makes the initial uevent suppression unnecessary.
> 
> Signed-off-by: Julian Wiedmann <jwi@...ux.ibm.com>
> ---
>  kernel/workqueue.c | 51 ++++++++++++++++++++--------------------------
>  1 file changed, 22 insertions(+), 29 deletions(-)
> 
> diff --git a/kernel/workqueue.c b/kernel/workqueue.c
> index 817dc2d7438a..629859ac5262 100644
> --- a/kernel/workqueue.c
> +++ b/kernel/workqueue.c
> @@ -5449,6 +5449,9 @@ static ssize_t wq_pool_ids_show(struct device *dev,
>  	return written;
>  }
>  
> +static struct device_attribute wq_sysfs_unbound_attr_pool_ids =
> +	__ATTR(pool_ids, 0444, wq_pool_ids_show, NULL);

__ATTR_RO() please.

> +
>  static ssize_t wq_nice_show(struct device *dev, struct device_attribute *attr,
>  			    char *buf)
>  {
> @@ -5502,6 +5505,9 @@ static ssize_t wq_nice_store(struct device *dev, struct device_attribute *attr,
>  	return ret ?: count;
>  }
>  
> +static struct device_attribute wq_sysfs_unbound_attr_nice =
> +	__ATTR(nice, 0644, wq_nice_show, wq_nice_store);

__ATTR_RW()

> +
>  static ssize_t wq_cpumask_show(struct device *dev,
>  			       struct device_attribute *attr, char *buf)
>  {
> @@ -5539,6 +5545,9 @@ static ssize_t wq_cpumask_store(struct device *dev,
>  	return ret ?: count;
>  }
>  
> +static struct device_attribute wq_sysfs_unbound_attr_cpumask =
> +	__ATTR(cpumask, 0644, wq_cpumask_show, wq_cpumask_store);

__ATTR_RW()

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ