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>] [day] [month] [year] [list]
Message-ID: <20211021083847.1812-1-caihuoqing@baidu.com>
Date:   Thu, 21 Oct 2021 16:38:46 +0800
From:   Cai Huoqing <caihuoqing@...du.com>
To:     <caihuoqing@...du.com>
CC:     Jiri Kosina <jikos@...nel.org>, Arnd Bergmann <arnd@...db.de>,
        "Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
        <linux-kernel@...r.kernel.org>
Subject: [PATCH] apm-emulation: Make use of the helper macro kthread_run()

Repalce kthread_create/wake_up_process() with kthread_run()
to simplify the code.

Signed-off-by: Cai Huoqing <caihuoqing@...du.com>
---
 drivers/char/apm-emulation.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/char/apm-emulation.c b/drivers/char/apm-emulation.c
index 230cf852fa9c..c18cdf4ecfd8 100644
--- a/drivers/char/apm-emulation.c
+++ b/drivers/char/apm-emulation.c
@@ -636,13 +636,12 @@ static int __init apm_init(void)
 		return -ENODEV;
 	}
 
-	kapmd_tsk = kthread_create(kapmd, NULL, "kapmd");
+	kapmd_tsk = kthread_run(kapmd, NULL, "kapmd");
 	if (IS_ERR(kapmd_tsk)) {
 		ret = PTR_ERR(kapmd_tsk);
 		kapmd_tsk = NULL;
 		goto out;
 	}
-	wake_up_process(kapmd_tsk);
 
 #ifdef CONFIG_PROC_FS
 	proc_create_single("apm", 0, NULL, proc_apm_show);
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ