Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1404123 > unrolled thread

[PATCH] security: tomoyo: simplify the gc kthread creation

Started byMike Danese <mikedanese@google.com>
First post2016-05-20 06:40 +0200
Last post2016-05-20 14:00 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] security: tomoyo: simplify the gc kthread creation Mike Danese <mikedanese@google.com> - 2016-05-20 06:40 +0200
    Re: [PATCH] security: tomoyo: simplify the gc kthread creation Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2016-05-20 14:00 +0200

#1404123 — [PATCH] security: tomoyo: simplify the gc kthread creation

FromMike Danese <mikedanese@google.com>
Date2016-05-20 06:40 +0200
Subject[PATCH] security: tomoyo: simplify the gc kthread creation
Message-ID<rAKo9-TE-1@gated-at.bofh.it>
The code is doing the equivalent of the kthread_run macro.

Signed-off-by: Mike Danese <mikedanese@google.com>
---
 security/tomoyo/gc.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/security/tomoyo/gc.c b/security/tomoyo/gc.c
index 986a6a7..540bc29 100644
--- a/security/tomoyo/gc.c
+++ b/security/tomoyo/gc.c
@@ -645,11 +645,6 @@ void tomoyo_notify_gc(struct tomoyo_io_buffer *head, const bool is_register)
 		}
 	}
 	spin_unlock(&tomoyo_io_buffer_list_lock);
-	if (is_write) {
-		struct task_struct *task = kthread_create(tomoyo_gc_thread,
-							  NULL,
-							  "GC for TOMOYO");
-		if (!IS_ERR(task))
-			wake_up_process(task);
-	}
+	if (is_write)
+		kthread_run(tomoyo_gc_thread, NULL, "GC for TOMOYO");
 }
-- 
2.5.0

[toc] | [next] | [standalone]


#1404364

FromTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Date2016-05-20 14:00 +0200
Message-ID<rARfX-51X-5@gated-at.bofh.it>
In reply to#1404123
Mike Danese wrote:
> The code is doing the equivalent of the kthread_run macro.
> 
> Signed-off-by: Mike Danese <mikedanese@google.com>

Acked-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>

> ---
>  security/tomoyo/gc.c | 9 ++-------
>  1 file changed, 2 insertions(+), 7 deletions(-)
> 
> diff --git a/security/tomoyo/gc.c b/security/tomoyo/gc.c
> index 986a6a7..540bc29 100644
> --- a/security/tomoyo/gc.c
> +++ b/security/tomoyo/gc.c
> @@ -645,11 +645,6 @@ void tomoyo_notify_gc(struct tomoyo_io_buffer *head, const bool is_register)
>  		}
>  	}
>  	spin_unlock(&tomoyo_io_buffer_list_lock);
> -	if (is_write) {
> -		struct task_struct *task = kthread_create(tomoyo_gc_thread,
> -							  NULL,
> -							  "GC for TOMOYO");
> -		if (!IS_ERR(task))
> -			wake_up_process(task);
> -	}
> +	if (is_write)
> +		kthread_run(tomoyo_gc_thread, NULL, "GC for TOMOYO");
>  }
> -- 
> 2.5.0
> 
> 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web