Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp5952655imm; Mon, 23 Jul 2018 08:50:44 -0700 (PDT) X-Google-Smtp-Source: AAOMgpctx0On5Sf3vWctT7CKLEdKP4pvUmIys8OvQi1h00ku1M7J0gJ8wfDh2jfnMrcZ607mpokX X-Received: by 2002:a63:338e:: with SMTP id z136-v6mr12427913pgz.171.1532361044343; Mon, 23 Jul 2018 08:50:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532361044; cv=none; d=google.com; s=arc-20160816; b=tttCzBhz/LR4G7eEEcR+7tRPsrCQhOPbpI5BJ2Tk2dhbs3lqXjA7YZ4lsaQDN6stT4 Z10rJ4wyCprj6R8a90IuRakQ0J9M0WkuoG6GicRR/W5bHdYRt+OOr95icH1EPO2l4l2x bT4ma8ws12pZAL26wdzvpWvXbMNPMF9hE3nJQ230B8siShityZA+TTWJWICYLlbp3O0n hhEclUm46Y7wmlz5US9tGVli+3GJKqimhqNBeI44bEi+I8HITZrOHySXpTRWJLVSBHFO 5pYJEF0sZCBwSNTJV3yVn6kBzZTdfz5gYHHIbc8U+nFxGbGVbMbB4L7xx5qEJr7Nv8cW mxCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=RzA104j4aMbLX8O7Y9GUwgMRWypFuAtv+ak0NZhzFCI=; b=XidldE3tIWSE7Q4UQd18ZRQt67iSr7d5W9NieDpvRYtWOcnkrJERe+gnf+WeEMyIyN RDmqh7PPcaPCNBSA6SvlK4RnwjbN+MSCoFp2iboL4QyOp36gP2TTC4DQfoBFg34BGEgH WUgtzB0peUX+VOzDw5s6q92yAmAzJDXr+mwfZub5vwcF62ABM0lDbtDcxhQrsp3ZPQ13 Jj/qJmyweS5vdJVHxSYc0DyIgEe9Qvs3uYrgzMAD1cgh4ZNtVDPeDRxRxloIR/9Vr/ak pFsK7W5qGESqxaQhCStWK4VystZ9a/GfAHgiu45AJriBRJUr1Bw09Zw/LpDaKu56W2G6 UW8Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g16-v6si1355731pgi.373.2018.07.23.08.50.28; Mon, 23 Jul 2018 08:50:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388316AbeGWQv2 (ORCPT + 99 others); Mon, 23 Jul 2018 12:51:28 -0400 Received: from seldsegrel01.sonyericsson.com ([37.139.156.29]:5456 "EHLO SELDSEGREL01.sonyericsson.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387968AbeGWQv2 (ORCPT ); Mon, 23 Jul 2018 12:51:28 -0400 Subject: Re: [PATCH RESEND] kthread, tracing: Don't expose half-written comm when creating kthreads To: Steven Rostedt CC: , Ingo Molnar , Jens Axboe , Tejun Heo , Greg Kroah-Hartman , Linus Torvalds , Peter Enderborg , Yoshitaka Seto , Oleksiy Avramchenko , KOSAKI Motohiro , John Stultz References: <20180723134210.54013-1-snild@sony.com> <20180723095550.08203a24@gandalf.local.home> <9d762b4e-20a7-578f-90c8-10a044921d67@sony.com> <20180723113741.66df3b50@gandalf.local.home> From: Snild Dolkow Message-ID: <7749ed7d-50d5-4b95-fbd2-b056a1fff957@sony.com> Date: Mon, 23 Jul 2018 17:49:36 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180723113741.66df3b50@gandalf.local.home> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/23/2018 05:37 PM, Steven Rostedt wrote: > On Mon, 23 Jul 2018 16:23:09 +0200 > Snild Dolkow wrote: > >> On 07/23/2018 03:55 PM, Steven Rostedt wrote: >> >>> Can you add a comment here stating something to the affect of: >>> /* task is now visible to other tasks */ >>> >>> -- Steve >> Sure, but isn't that a bit misleading? It will have been visible since >> some unknown point in time between waking up kthreadd and the return of >> wait_for_completion(); we're not the ones making it visible. >> > > I guess that should be reworded, as that is not what I meant, and I > thought not what I stated. It's stating that the task is now visible, > not that we are now making it invisible. But I guess I was being too > short with what I meant. Here's the full statement: > > /* > * task is now visible by other tasks, so updating COMM > * must be protected. > */ > > -- Steve > Ah. It's the "now" that trips me up. :) Will add: /* * task is already visible to other tasks, so updating * COMM must be protected. */ Any issues with the commit message? Reading it back again now, it doesn't seem quite as clear as when I wrote it. //Snild