Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5092372ybe; Tue, 17 Sep 2019 02:27:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqw2Iquqnp7ve7eVSb8PgDc3piaAJI6KA9j7ktkPe33MofxbeezI9Lf3N4Zk2DpmrLbdD7cK X-Received: by 2002:a50:d55e:: with SMTP id f30mr3632487edj.35.1568712423801; Tue, 17 Sep 2019 02:27:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568712423; cv=none; d=google.com; s=arc-20160816; b=MvSqdWmjeCXTrkp41qtBLQsdBESeu1CdrD7IHU1Me1wzr9jzsbpuDJJO8crfripdaB yo11NzUhumLqruyxNVhIkBmFNj768WddNcfocK8D9Ps0CKDtf86o3tWCoiAoglT7GA7D IqLHldvi2oQowzkDVSENlQ5NbOv0XVmd21KKvD4ZOJpMuIVS0lPOk2fygxqz/IAsqdzQ h4j446hEIHceC05PL9wgWyEUdKEsngzA3cndT+GtanF0pqZjylZV/hJeNv57CMc9U5d6 2o2voIJSMwVv8Wb/1+p4UCKK6DSrLgnr06D9FlE0dEN48E0iMe1YyutLcUCXN9atpwPB K/eQ== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=OMkfZUtEH3Iy/422Tq9nlk/GOoplInUSm8ZI2VsXK7Q=; b=CrMSJ7AbZQ64MqarMXRxA1xeZ8kblIEYvLeEFwe9OQ6qk19+0NVNmAgDcuSbCkI52G 7RNKit4WslhdPjjZLtfNO+bqQZ1zNRalOMmfuF42PjmTKJ8GLtWJQXCMMzFloGvaRKnP wzLIkzUNjqhw+eBYL+eu9oWLrCj+EmCNxHFRfJKKL7k15J10IVP4gV8qwcKp+mQIfHms L67ZG3oJLiawtGDPsEP4+LvzKqCdl76RGX7YK9T3P8G8G1JUmDbJ2u8RuXwYnmj1weLD 9ns59xWAayiotRhxvtRart9BXhdZ98tlpuxCBEno0/T34OP4hzUIRnql519MVAACihB+ 7qoA== 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 pv19si789182ejb.181.2019.09.17.02.26.40; Tue, 17 Sep 2019 02:27:03 -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 S2391681AbfIQCgk (ORCPT + 99 others); Mon, 16 Sep 2019 22:36:40 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:2276 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728470AbfIQCgk (ORCPT ); Mon, 16 Sep 2019 22:36:40 -0400 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 5E0B5FF98FA75F82202F; Tue, 17 Sep 2019 10:36:38 +0800 (CST) Received: from huawei.com (10.175.104.232) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.439.0; Tue, 17 Sep 2019 10:36:28 +0800 From: KeMeng Shi To: , , , , , , , , , CC: Subject: Re: Re: [PATCH] connector: report comm change event when modifying /proc/pid/task/tid/comm Date: Mon, 16 Sep 2019 22:36:23 -0400 Message-ID: <20190917023623.798-1-shikemeng@huawei.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190916211008.ipqe3j7s22aannta@willie-the-truck> References: <20190916211008.ipqe3j7s22aannta@willie-the-truck> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.104.232] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >(2) What prevents proc_comm_connector(p) running concurrently with itself > via the prctl()? The locking seems to be confined to set_task_comm(). To be honest, I did not consider the concurrence problem at beginning. And some comm change events may lost or are reported repeatly as follows: set name via procfs set name via prctl set_task_comm set_task_comm proc_comm_connector proc_comm_connector Comm change event belong to procfs losts and the fresh comm change belong to prctl is reported twice. Actually, there is also concurrence problem without this update as follows: set name via procfs set name via prctl set_task_comm set_task_comm proc_comm_connector Comm change event from procfs is reported instead of prctl, this may bothers user who only care the comm change via prctl. There is no matter if user only care the latest comm change otherwise, put setting name and reporting event in crtical region may be the only answer. Thanks for review. KeMeng Shi