From patchwork Fri May 20 04:37:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Danese X-Patchwork-Id: 9128607 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 12BA36048B for ; Fri, 20 May 2016 04:39:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0697020622 for ; Fri, 20 May 2016 04:39:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EF57425D91; Fri, 20 May 2016 04:39:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A3D3C20622 for ; Fri, 20 May 2016 04:39:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751500AbcETEir (ORCPT ); Fri, 20 May 2016 00:38:47 -0400 Received: from mail-pa0-f53.google.com ([209.85.220.53]:34988 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751017AbcETEiq (ORCPT ); Fri, 20 May 2016 00:38:46 -0400 Received: by mail-pa0-f53.google.com with SMTP id tb2so18528274pac.2 for ; Thu, 19 May 2016 21:38:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=NGNiL1qRx5yEB/+QIdQPEhGGeVLJ+Fi7LxL5ub/45jA=; b=Ubyh7IDGJApH6w8c6O8J1gHgx2obQGkD5IN60FV5QzCA3G9BCk5+9wTdYFn/5zrhEJ lFrJLNei+H+4/z0x2u+ow49bFL/cDBv6xNKV3IQvZe+u+XSCK+os4q2AkVBkl73gUQva iCj0P9njbvvFX+aTaDVJ4by2RvkirzoYpd+TJZGB7q1AgViI6PtHQBhbWYxNrLeeMFIy 9ftU0ybnVA11MpRUe0sb/9nIOzql736saA2lUqXxXiUoaIYNL7Kqiw7op1+AS0B7A4LK BIZ6B8N0/GKLZVNbpSl/BZefLS0Yo9GueaJtH9bZV5dVv4OqEv1Y7bf8Qcv2OWePnTuD MtsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=NGNiL1qRx5yEB/+QIdQPEhGGeVLJ+Fi7LxL5ub/45jA=; b=eg/uwbiD21Ef8VGHVztnuYl/qn4h0op1jalIBIdFNxbk7kfxUF/+UPs7Pcu0aLqHGC 1Wp9urGUstSpfeFp5ugj+8ptGS/afSTaFQSS9JJ+WCfOPgDo06t7pXlnlyhMQJbgOA3w TJ/opC+ve1arjkSr0qgPtxm+u1vReqNdlM5QJVu02K+4nIic4bF242hPI5sJ0qybmt1M Ce01oUmTHZ3DQoMFFz4ZXnmf50jDkJLLTHGqs3Fz7YQC4A69edkQOWPqABeX0vS1Z/6f 4pAIgSa/8KvZvUvQL7ooOhrLH1eDsgV5wZEYLfGe/ySrHl2RutTL5jWQl/cQRAEC7jK2 XxwQ== X-Gm-Message-State: AOPr4FU5o5J8+FARhx8vUFtDK0rgvCcU7nnPkMYeGxhByASnpDUAEHbwW3w1Q+jQlt2C0uyn X-Received: by 10.66.90.196 with SMTP id by4mr1528343pab.117.1463719125146; Thu, 19 May 2016 21:38:45 -0700 (PDT) Received: from localhost.localdomain (c-67-169-180-20.hsd1.ca.comcast.net. [67.169.180.20]) by smtp.gmail.com with ESMTPSA id z9sm23319024pfa.84.2016.05.19.21.38.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 19 May 2016 21:38:44 -0700 (PDT) From: Mike Danese Cc: Mike Danese , Kentaro Takeda , Tetsuo Handa , James Morris , "Serge E. Hallyn" , linux-security-module@vger.kernel.org (open list:SECURITY SUBSYSTEM), linux-kernel@vger.kernel.org (open list) Subject: [PATCH] security: tomoyo: simplify the gc kthread creation Date: Thu, 19 May 2016 21:37:53 -0700 Message-Id: <1463719073-1346-1-git-send-email-mikedanese@google.com> X-Mailer: git-send-email 2.5.0 To: unlisted-recipients:; (no To-header on input) Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: X-Virus-Scanned: ClamAV using ClamSMTP The code is doing the equivalent of the kthread_run macro. Signed-off-by: Mike Danese Acked-by: Tetsuo Handa --- 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"); }