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]
Date:	Thu, 3 Apr 2014 12:37:00 +0530
From:	Viresh Kumar <viresh.kumar@...aro.org>
To:	Frederic Weisbecker <fweisbec@...il.com>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Christoph Lameter <cl@...ux.com>,
	Kevin Hilman <khilman@...aro.org>,
	Mike Galbraith <bitbucket@...ine.de>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	Tejun Heo <tj@...nel.org>
Subject: Re: [PATCH 3/4] workqueue: Add anon workqueue sysfs hierarchy

On 27 March 2014 22:51, Frederic Weisbecker <fweisbec@...il.com> wrote:
> diff --git a/kernel/workqueue.c b/kernel/workqueue.c

>  static int __init wq_sysfs_init(void)
>  {
> -       return subsys_virtual_register(&wq_subsys, NULL);
> +       struct device *anon_dev;
> +       int ret;
> +
> +       ret = subsys_virtual_register(&wq_subsys, NULL);
> +       if (ret < 0)
> +               return ret;
> +
> +       mutex_lock(&wq_unbound_mutex);
> +       cpumask_copy(&wq_anon_cpumask, cpu_possible_mask);
> +       mutex_unlock(&wq_unbound_mutex);
> +
> +       anon_dev = kzalloc(sizeof(*anon_dev), GFP_KERNEL);
> +       if (!anon_dev)
> +               return -ENOMEM;
> +
> +       anon_dev->bus = &wq_subsys;
> +       anon_dev->init_name = "anon_wqs";
> +       anon_dev->release = device_release;
> +
> +       ret = device_register(anon_dev);
> +       if (ret) {
> +               kfree(anon_dev);
> +               return ret;
> +       }
> +
> +       ret = device_create_file(anon_dev, &wq_sysfs_anon_attr);
> +       if (ret) {
> +               device_unregister(anon_dev);

kfree(anon_dev) ??

> +               return ret;
> +       }
> +
> +       kobject_uevent(&anon_dev->kobj, KOBJ_ADD);
> +
> +       return 0;
>  }
>  core_initcall(wq_sysfs_init);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ