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-next>] [day] [month] [year] [list]
Message-ID: <20211021084328.2395-1-caihuoqing@baidu.com>
Date:   Thu, 21 Oct 2021 16:43:27 +0800
From:   Cai Huoqing <caihuoqing@...du.com>
To:     <caihuoqing@...du.com>
CC:     Nicolas Saenz Julienne <nsaenz@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        <bcm-kernel-feedback-list@...adcom.com>,
        <linux-rpi-kernel@...ts.infradead.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-staging@...ts.linux.dev>, <linux-kernel@...r.kernel.org>
Subject: [PATCH] staging: vchiq_arm: 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>
---
 .../staging/vc04_services/interface/vchiq_arm/vchiq_arm.c  | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
index a5e33da74726..6130b95aaca3 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
@@ -1717,15 +1717,12 @@ void vchiq_platform_conn_state_changed(struct vchiq_state *state,
 	write_unlock_bh(&arm_state->susp_res_lock);
 	snprintf(threadname, sizeof(threadname), "vchiq-keep/%d",
 		 state->id);
-	arm_state->ka_thread = kthread_create(&vchiq_keepalive_thread_func,
-					      (void *)state,
-					      threadname);
+	arm_state->ka_thread = kthread_run(&vchiq_keepalive_thread_func,
+					   (void *)state, threadname);
 	if (IS_ERR(arm_state->ka_thread)) {
 		vchiq_log_error(vchiq_susp_log_level,
 				"vchiq: FATAL: couldn't create thread %s",
 				threadname);
-	} else {
-		wake_up_process(arm_state->ka_thread);
 	}
 }
 
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ